diff options
author | Vincent Douillet <vincent@vdouillet.fr> | 2023-08-09 10:51:16 +0200 |
---|---|---|
committer | Vincent Douillet <vincent@vdouillet.fr> | 2023-08-09 10:51:16 +0200 |
commit | 8b04ab2fc5d34693052fd16de20237498de67f58 (patch) | |
tree | 8fac3830bde09d326abc8cdee159205425c4d1ee | |
parent | f172ffca292594147939280dab20cb03a4921fb6 (diff) |
add readme
-rw-r--r-- | README.md | 26 | ||||
-rw-r--r-- | config.h | 14 |
2 files changed, 40 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..482d762 --- /dev/null +++ b/README.md @@ -0,0 +1,26 @@ +# Vault + +Vault is an opinionated web-based file manager. It is built in C for OpenBSD around the CGI standard, following these main principles: + +* __secure__: a great amount of time has been devoted to avoid undefined behaviour and security issues +* __simple__: browse, create and delete folders; download and upload files. JavaScript support is optional on the client side and its absence should be handled gracefully. Everything should work from a terminal-based web browser +* __fast__: with the server running on an ARM SBC, there should not be any noticeable delay when loading a page + +It should also compile and run on any POSIX OS with minor modifications, although this has not been tested (yet). + +## Configure + +The parameters and their documentation are in the `config.h` source file. You should read and adjust this file as needed before you build. + +## Build & run + +Vault comes with a Makefile: + + $ make + # make install + +The vault binary will be installed as `/var/www/cgi-bin/vault`. You need to configure your web server accordingly. If the log file does not exist, you need to create it. Here is how to do it for a default installation: + + # mkdir -p /var/www/var/log + # touch /var/www/var/log/vault.log + # chown www /var/www/var/log/vault.log @@ -31,7 +31,21 @@ #ifndef VAULT_CONFIG_H #define VAULT_CONFIG_H +/* + * The directory that will be browseable through vault. The vault process + * should have full read/write access to this folder and any subfolders and + * files. + */ +#ifndef DATA_DIR #define DATA_DIR "/var/www/vault-data" +#endif + +/* + * The log file. The vault process needs write permissions to this file, + * otherwise it will quit with an error. + */ +#ifndef LOG_FILE #define LOG_FILE "/var/log/vault.log" +#endif #endif /* VAULT_CONFIG_H */ |