Does it *need* to be run as root?

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

Does it *need* to be run as root?

Postby mau » 13. February 2006 07:12

Does XAMPP have to be run as root? I would like to be able to auto-start XAMPP from Eclipse's PHP extension, but I cannot do this without running Eclipse as root (which I don't really want it to do).

It seems to be running as root would be a security issue, anyways? Don't web-servers usually run as nobody?
mau
 
Posts: 6
Joined: 29. June 2005 06:33

Postby Dave_L » 13. February 2006 23:48

I think that the XAMPP startup script /opt/lampp/lampp has to be run by root. But XAMPP doesn't really "run". The XAMPP script starts other things, such as Apache. When Apache starts, the user as whom it runs is determined by the settings in /opt/lampp/etc/httpd.conf, which (in my installation) are:

Code: Select all
User nobody
Group nogroup
User avatar
Dave_L
 
Posts: 212
Joined: 23. October 2004 00:43

Does it *need* to be run as root?

Postby alfarid » 14. February 2006 02:27

i doubt you need to start as root either.

lampp is a script that dispatches to other scripts within /opt/lampp/share dirspace

each script checks if user is root, so , as long as none of your processes try to listen on low ports you dont need your scripts to check if it is running as root: you can safely(well, i could be wrong here 8) ) disable those checks..

good luck!
alfarid
 
Posts: 1
Joined: 14. February 2006 01:59

Postby Dave_L » 14. February 2006 11:27

Maybe you don't need to start XAMPP as root. But I have it configured to autostart using the Linux runlevels:

Code: Select all
ln -s /opt/lampp/lampp /etc/init.d/lampp
ln -s /etc/init.d/lampp /etc/rc0.d/K01lampp
ln -s /etc/init.d/lampp /etc/rc1.d/K01lampp
ln -s /etc/init.d/lampp /etc/rc2.d/S99lampp
ln -s /etc/init.d/lampp /etc/rc3.d/S99lampp
ln -s /etc/init.d/lampp /etc/rc4.d/S99lampp
ln -s /etc/init.d/lampp /etc/rc5.d/S99lampp
ln -s /etc/init.d/lampp /etc/rc6.d/K01lampp


This is for using XAMPP 1.4.9 on a Debian-based distribution. The runlevel usage and directory location varies somewhat across distributions.
User avatar
Dave_L
 
Posts: 212
Joined: 23. October 2004 00:43


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 53 guests