From 2d6d6819e6ee380e4e7951ee2be324a75ed48007 Mon Sep 17 00:00:00 2001 From: Clarth Date: Tue, 1 Dec 2026 15:28:10 -0500 Subject: [PATCH] README: data dir and config.php permissions --- README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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