473,763 Members | 4,808 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.2 2_2.8.5
IFS
ORIG_USER root
ORIG_LOGNAME root

PHP Variables

HTTP_SERVER_VAR S["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_HOM E"] /root
HTTP_ENV_VARS["SUPERCMD"] apachectl_1.3.2 2_2.8.5
HTTP_ENV_VARS["IFS"]

HTTP_ENV_VARS["ORIG_USER"] root
HTTP_ENV_VARS["ORIG_LOGNA ME"] root
Jul 17 '05 #1
4 2246
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.2 2_2.8.5
IFS
ORIG_USER root
ORIG_LOGNAME root

PHP Variables

HTTP_SERVER_VAR S["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_HOM E"] /root
HTTP_ENV_VARS["SUPERCMD"] apachectl_1.3.2 2_2.8.5
HTTP_ENV_VARS["IFS"]

HTTP_ENV_VARS["ORIG_USER"] root
HTTP_ENV_VARS["ORIG_LOGNA ME"] 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****@westert erp.com> wrote in message news:<41******* *************** *@news.xs4all.n l>...
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******@geocit ies.com (lawrence) wrote:
"Pjotr Wedersteers" <x3****@westert erp.com> wrote in message news:<41******* *************** *@news.xs4all.n l>...
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@databa six 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
2350
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, when I execute any system configuration gui program, i.e. /usr/bin/system-config-*, it raises an error message as follows: File "/usr/src/build/375621-i386/install/usr/lib/python2.3/site-packages/gtk-2.0/gtk/__init__.py", line 43, in ?
2
1095
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 of the document element, or is the element. Furthermore, the document element must be a 'b' element, and x is an 'a' element or has an 'a' descendant...
14
3433
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 long. I am writing a program in Visual C++ 6 SP5. My code has a lot of "if" statements - 19 to be exact. If the if statements are true (technically, there should only be one that is ever true), the program needs to continue on after the if...
8
2010
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 msg that im getting: "Error executing cl.exe" this is the code that I have, but I know whats causing it, ill just show you the whole thing first though //file: Quadratic
13
12750
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 3 Click here : www.c4swimmers.esmartguy.com to Test Your C Programming Strengths.
7
1482
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" classid="SSCtrl.dll#SSCtrl.SSFileCtrl" VIEWASTEXT> </OBJECT> The previous code only works if SSCtrl.dll is inside the application root of ASP.NET project. It doesn't work if the file is inside the "bin" folder,
3
1816
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 my REAL root namespace, or should I leave it blank, or should I create any at all? Please advice. Thanks in advance. CCJohn
44
2815
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
1046
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 selected data is OK though. But not loads of real world data. 2) Its not so easy to make relations between 'tables'. A database does it better 3) XPath is basically another version of SQL. 4) Much practical real world data is lots of text (eg...
0
9563
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9386
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9937
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9822
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8821
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7366
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6642
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5270
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
2793
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.