diff --git a/README.md b/README.md index a093d5d..fb48af5 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,17 @@ A small PHP web UI to edit the tinyauth environment file, and to start, stop, re Make sure the `data/` directory is writable by `www-data`, and that it is not inside the web root. -6. Open the page, log in, and pick the access group. Check the **Permission checks** section. +6. **Set file permissions** (as root). PHP runs as `www-data`, so it needs to read the code and config and write `data/`. Pre-create `data/`, because the checkout is usually owned by your own user: + + ``` + install -d -o www-data -g www-data -m 0750 /path/to/tinyauth-web/data + chown root:www-data /path/to/tinyauth-web/config.php + chmod 640 /path/to/tinyauth-web/config.php + ``` + + `config.php` holds the client secret, so it must not be world-readable. + +7. Open the page, log in, and pick the access group. Check the **Permission checks** section. ## Notes