Run Xampp as root

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Run Xampp as root

Postby erentar2002 » 21. May 2019 12:13

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.
erentar2002
 
Posts: 3
Joined: 21. May 2019 11:59
XAMPP version: 7.3.5-1
Operating System: Debian 10

Re: Run Xampp as root

Postby Nobbie » 21. May 2019 16:26

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: https://help.ubuntu.com/community/Mount/USB

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.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: Run Xampp as root

Postby erentar2002 » 22. May 2019 17:09

I'm afraid that does not work. How can i recompile the package so that it will run as root?
erentar2002
 
Posts: 3
Joined: 21. May 2019 11:59
XAMPP version: 7.3.5-1
Operating System: Debian 10

Re: Run Xampp as root

Postby Nobbie » 22. May 2019 21:49

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.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: Run Xampp as root

Postby erentar2002 » 23. May 2019 01:55

Thanks!
erentar2002
 
Posts: 3
Joined: 21. May 2019 11:59
XAMPP version: 7.3.5-1
Operating System: Debian 10


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 26 guests