Page 1 of 1

Does it *need* to be run as root?

PostPosted: 13. February 2006 07:12
by mau
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?

PostPosted: 13. February 2006 23:48
by Dave_L
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

Does it *need* to be run as root?

PostPosted: 14. February 2006 02:27
by alfarid
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!

PostPosted: 14. February 2006 11:27
by Dave_L
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.