0
Answered

is there a way to run the filerun as root instead www-data ?

jaywalker 2 years ago updated by ovidiu 3 months ago 4

Sorry about a noob question. I wonder there is a way to launch filerun server with root account.

Currently I've running some docker apps like torrent, cloud, ebook etc, and needed handle files with root permission..

I've tested the nextcloud fpm with some modified www.conf and docker command, and it was running successfully. so, I wonder filerun could be.

Thanks to read a dangerous questoin.

Answer

Answer
Answered

Please see "APACHE_RUN_USER" and the other available variables: https://docs.filerun.com/docker

Answer
Answered

Please see "APACHE_RUN_USER" and the other available variables: https://docs.filerun.com/docker

Could you give some pointers please? Simply selecting user root and uid 0 leads to this error:

+ exec apache2-foreground │
│ AH00526: Syntax error on line 115 of /etc/apache2/apache2.conf: │
│ Error:\tApache has not been designed to serve pages while\n\trunning as root. There are known race conditions that\n\twill allow any local user │
│ to read any file on the system.\n\tIf you still desire to serve pages as root then\n\tadd -DBIG_SECURITY_HOLE to the CFLAGS env variable\n\tand t │
│ hen rebuild the server.\n\tIt is strongly suggested that you instead modify the User\n\tdirective in your httpd.conf file to list a non-root\n\tu │
│ ser.\n

The reason I am asking, maybe there is an easier way for what I need. I need to give access permissions to filerun to some folder mounted via volumes from outside and those are ownd by root:root - so basically, inside the docker container the web server needs to run with uid 0 and guid 0 or at least one of them as I understand things.

You can't run FileRun's Apache as root. Apache would need rebuilding with a particular flag for it. We won't change it ourselves as we believe it's a bad idea to do that. I hope you find an alternative solution.

Thanks, I sorted it out, just created a new user and used that user/group instead of root.