Page 1 of 1

Run Xampp as root

PostPosted: 21. May 2019 12:13
by erentar2002
Here's the deal:
I have an xampp instance set up on a removable drive. I symlink htdocs and get a 403 Forbidden, probably due to i am logged in as root and user daemon is unable to access /media/root. When i change user to root xampp complains that i run it as root and refuses to run:
Code: Select all
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 then 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\tuser.\n

For the CFLAGS env variable, i have no idea what it is and google cant find a git instance where i can download the raw source and compile it with this variable changed.

What are my options?

httpd.conf: Require all granted
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all

Debian 10 Buster, kernel 4.19.0, arch amd64

Please dont offer solutions based on changing user. I need a solution to running this as root.

Re: Run Xampp as root

PostPosted: 21. May 2019 16:26
by Nobbie
Instead of Automount, mount the flashdrive manually and apply the options to change ownership and read/write rights (in order to fit daemons needs).

Here is an article for Ubuntu about mounting USB drives:

Most of the commands will work for Debian as well, as Ubuntu is based on Debian. If you have further questions about Debian Linux, ask in a Debian Linux Forum. This is the Xampp Forum only.

Re: Run Xampp as root

PostPosted: 22. May 2019 17:09
by erentar2002
I'm afraid that does not work. How can i recompile the package so that it will run as root?

Re: Run Xampp as root

PostPosted: 22. May 2019 21:49
by Nobbie
erentar2002 wrote:I'm afraid that does not work.

No, thats impossible. Of course its a question of your knowlegde. But there is definately a way to do it. Without any doubts.

Ask Bitnami for a package that runs as root. Dont know if the can do it for you. Its the wrong solution anyway - see above.

Re: Run Xampp as root

PostPosted: 23. May 2019 01:55
by erentar2002