-
Notifications
You must be signed in to change notification settings - Fork 22
Description
Describe the bug
When I force FileRise to run as --user 99:100, the container’s startup script (start.sh) fails with multiple “Permission denied” errors while trying to write its Apache/PHP config files under /etc. As a direct result, the container crashes/exits. I think the init script still runs as root and expects to be able to modify /etc, so dropping privileges too early breaks startup. This is a bit of an issue on Unraid, as running without PGID/PUID 99:100 (nobody:users) does not by default allow access to any 99:100 files in appdata directories, for example, and recursively expanding permissions on entire appdata directories is considered bad practice for security (as well as usability in a few instances). Is there a correct way to run the service as a specific PGID/PUID, or is this unaccounted for right now? Without this ability, FileRise is somewhat practical for file upload in empty directories but not file traversal in actively used directories since local system files are invisible/inaccessible.
To Reproduce
Steps to reproduce the behavior:
In the Unraid Docker template for FileRise, enable Advanced View.
Under Extra Parameters, add:
--user 99:100
Apply / start the container.
Check the container logs; you’ll see errors like:
/usr/local/bin/start.sh: line 42: /etc/php/8.3/apache2/conf.d/99-custom.ini: Permission denied
/usr/local/bin/start.sh: line 69: /etc/apache2/conf-enabled/limit_request_body.conf: Permission denied
…and so on…
Expected behavior
I expected that setting --user 99:100 would allow FileRise to run entirely as UID 99/GID 100, adjusting any needed file permissions automatically, without startup failures.
I figured either:
Run its Apache/PHP config steps as root and then drop to filerise user for the web server, or
Respect the PUID/PGID env‑vars and chown the /etc files appropriately before writing.
etc
In any case, I would hope to see system files without making sweeping permissions edits (Ones that, if we're being honest, most users probably don't understand or audit as well as they should for security purposes).
Desktop (please complete the following information):
- OS: Windows 11
- Vivaldi
- error311/filerise-docker:latest