473,403 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

should PHP ever run as root?

My company is leasing a server from Interland, which is a very large
web hosting company. I assume Interland knows how to set up a BSD
server with the usual add-ons, including PHP. But when I run
phpinfo(), I get information that makes it seem like PHP is running as
root. Isn't this a security problem?

This is some of the info I'm getting back from phpinfo():

Additional Modules

Environment
USER root
HOME /root
ORIG_HOME /root
LOGNAME root
TERM vt100
PATH /bin:/usr/bin
CALLER root
CALLER_HOME /root
SUPERCMD apachectl_1.3.22_2.8.5
IFS
ORIG_USER root
ORIG_LOGNAME root

PHP Variables

HTTP_SERVER_VARS["argc"] 0
HTTP_ENV_VARS["USER"] root
HTTP_ENV_VARS["HOME"] /root
HTTP_ENV_VARS["ORIG_HOME"] /root
HTTP_ENV_VARS["LOGNAME"] root
HTTP_ENV_VARS["TERM"] vt100
HTTP_ENV_VARS["PATH"] /bin:/usr/bin
HTTP_ENV_VARS["CALLER"] root
HTTP_ENV_VARS["CALLER_HOME"] /root
HTTP_ENV_VARS["SUPERCMD"] apachectl_1.3.22_2.8.5
HTTP_ENV_VARS["IFS"]

HTTP_ENV_VARS["ORIG_USER"] root
HTTP_ENV_VARS["ORIG_LOGNAME"] root
Jul 17 '05 #1
4 2224
lawrence wrote:
My company is leasing a server from Interland, which is a very large
web hosting company. I assume Interland knows how to set up a BSD
server with the usual add-ons, including PHP. But when I run
phpinfo(), I get information that makes it seem like PHP is running as
root. Isn't this a security problem?


That looks bad... Try creating a directory at the "/" level. If you can
do that, then you can do about anything....

--
Justin Koivisto - sp**@koivi.com
PHP POSTERS: Please use comp.lang.php for PHP related questions,
alt.php* groups are not recommended.
Jul 17 '05 #2
lawrence wrote:
My company is leasing a server from Interland, which is a very large
web hosting company. I assume Interland knows how to set up a BSD
server with the usual add-ons, including PHP. But when I run
phpinfo(), I get information that makes it seem like PHP is running as
root. Isn't this a security problem?

This is some of the info I'm getting back from phpinfo():

Additional Modules

Environment
USER root
HOME /root
ORIG_HOME /root
LOGNAME root
TERM vt100
PATH /bin:/usr/bin
CALLER root
CALLER_HOME /root
SUPERCMD apachectl_1.3.22_2.8.5
IFS
ORIG_USER root
ORIG_LOGNAME root

PHP Variables

HTTP_SERVER_VARS["argc"] 0
HTTP_ENV_VARS["USER"] root
HTTP_ENV_VARS["HOME"] /root
HTTP_ENV_VARS["ORIG_HOME"] /root
HTTP_ENV_VARS["LOGNAME"] root
HTTP_ENV_VARS["TERM"] vt100
HTTP_ENV_VARS["PATH"] /bin:/usr/bin
HTTP_ENV_VARS["CALLER"] root
HTTP_ENV_VARS["CALLER_HOME"] /root
HTTP_ENV_VARS["SUPERCMD"] apachectl_1.3.22_2.8.5
HTTP_ENV_VARS["IFS"]

HTTP_ENV_VARS["ORIG_USER"] root
HTTP_ENV_VARS["ORIG_LOGNAME"] root


Welll, that looks really neat!
Just launch a script execing shutdown -h 0 and see what happens.
Houston, that is not good, I repeat not good

Without wanting to feed an urban myth, xs4all, among the bigger providers
here in the Netherlands also hardly seem to have a clue about a lot of what
even I call straightforward stuff.

Perhaps though this is a chrooted environment ? Not too familiar with all
its intricacies, but I guess it could be possible to make it seem like a
regular root ? But maybe I am babbling as well. I often am, they say ;-)

If this is truely a root environment I'd feel rather awkward, knowing the
userbase of these big players.

Good luck with that, and have a ball while you're at it! (and keep us
posted!)
Pjotr
Jul 17 '05 #3
"Pjotr Wedersteers" <x3****@westerterp.com> wrote in message news:<41***********************@news.xs4all.nl>...
lawrence wrote:
My company is leasing a server from Interland, which is a very large
web hosting company. I assume Interland knows how to set up a BSD
server with the usual add-ons, including PHP. But when I run
phpinfo(), I get information that makes it seem like PHP is running as
root. Isn't this a security problem?
.... Welll, that looks really neat!
Just launch a script execing shutdown -h 0 and see what happens.
Houston, that is not good, I repeat not good
I'll give that a try later today.
Perhaps though this is a chrooted environment ? Not too familiar with all
its intricacies, but I guess it could be possible to make it seem like a
regular root ? But maybe I am babbling as well. I often am, they say ;-)


What does chrooted mean?

By the way, I just had PHP create a directory and the owner of the
directory was listed as "nobody". What to conclude? Or, better, what
to test?
Jul 17 '05 #4
On 6 Aug 2004 11:40:49 -0700, lk******@geocities.com (lawrence) wrote:
"Pjotr Wedersteers" <x3****@westerterp.com> wrote in message news:<41***********************@news.xs4all.nl>...
lawrence wrote:
> My company is leasing a server from Interland, which is a very large
> web hosting company. I assume Interland knows how to set up a BSD
> server with the usual add-ons, including PHP. But when I run
> phpinfo(), I get information that makes it seem like PHP is running as
> root. Isn't this a security problem?
...
Welll, that looks really neat!
Just launch a script execing shutdown -h 0 and see what happens.
Houston, that is not good, I repeat not good


I'll give that a try later today.
Perhaps though this is a chrooted environment ? Not too familiar with all
its intricacies, but I guess it could be possible to make it seem like a
regular root ? But maybe I am babbling as well. I often am, they say ;-)


What does chrooted mean?


It means the directory structure is made to appear that you're in one
place (like / ) when you're really in another ( like /usr/yourname >
and the directories like bin, etc and lib show up with only the
commands you can run.
By the way, I just had PHP create a directory and the owner of the
directory was listed as "nobody". What to conclude? Or, better, what
to test?


nobody is the userid assigned to the web server by default.
--
gburnore@databasix dot com
---------------------------------------------------------------------------
How you look depends on where you go.
---------------------------------------------------------------------------
Gary L. Burnore | ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
| ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
DataBasix | ÝÛ³ºÝ³Þ³ºÝ³³Ýۺݳ޳ºÝ³Ý³Þ³ºÝ³ÝÝÛ³
| ÝÛ³ 3 4 1 4 2 ݳ޳ 6 9 0 6 9 ÝÛ³
Black Helicopter Repair Svcs Division | Official Proof of Purchase
================================================== =========================
Want one? GET one! http://signup.databasix.com
================================================== =========================
Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Qianqian Fang | last post by:
hi I installed Fedora Core 2 in my desktop and it has been running flawlessly in the last few months until I upgraded some packages (gtk/gtk-devel/python) to the latest version via apt-get. Now,...
2
by: Soren Kuula | last post by:
/a//b//a ? - or am I wrong in that it will never select a node for any document? I read it "the document element must be an 'a' element; there must be a 'b' element x which is a descendant...
14
by: root | last post by:
Hi group, Apologies in advance if this has been asked somewhere before, but I haven't managed to get anything from the Google archives - I've been getting introductory guides to C++ all day...
8
by: Bshealey786 | last post by:
Okay im doing my final project for my first computer science class(its my major, so it will be my first of many), but anyway im a beginner so im not to great with C++ yet. Anyway this is the error...
13
by: Kishor | last post by:
Hi Friends Please help me to write a C program to find the 5th (fifth) root of a given number. Ex:(1) Input : 32 Output : 5th root of 32 is 2 Ex:(1) Input : 243 Output : 5th root of 243 is...
7
by: Hani Atassi | last post by:
I developed a client side control using Windows Forms and I want to deploy it through IE inside an ASP.NET project. I am using the object tag to deploy: <OBJECT id="SSFileCtrl1"...
3
by: CCJohn | last post by:
Hi, I find that while I can use the "Namespace...End Namespace" inside my code, there is also a "Root namespace" field in the project properties dialog box under General. So where should I put...
44
by: Mikito Harakiri | last post by:
This is a continuation of the old theme, now featuring xml. <tree> <node id=0 parent_id=null label='A'> <node id=1 parent_id=0 label='B'> <node id=2 parent_id=0 label='C'> ... </tree>
6
by: heinz | last post by:
XML is supposed to 'separate data from presentation and be humanly readable'. 1) An XML file cannot accept many characters as data. eg " ; < all have to be filtered. One or two lines of carefully...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.