#1 (permalink)  
Old 05-28-2006, 06:02 PM
Registered User
 
Join Date: Apr 2003
Location: Norway
Posts: 23
numberonehost
Security of accounts on cpanel servers.

If a cpanel server is running PHP as a module in Apache I will be able to read/edit other peoples files if (assuming that apache runs with user nobody):
I upload a CGI/PHP script so that it is owned by user nobody. PHP will then be restricted by safe_mode or open_basedir, but CGI will not be restricted by anything. If another account on the same server has files owned by user nobody, I will have full access to these using CGI (and might have access with PHP depending on safe_mode/open_basedir).

Are my assumtions correct? I'm writing a master thesis so I would really appreciate if anyone could reply
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-28-2006, 07:57 PM
Registered User
 
Join Date: Jan 2004
Location: Roswell, GA
Posts: 363
cooldude7273 is on a distinguished road
Off topic, but I am the Number1Host

__________________
Number1Host.net
Shared, Reseller, and Dedicated Hosting
Server Setup, Management, and Security
The Web's Number 1 Host - Number1Host.net
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 05-28-2006, 07:59 PM
dgbaker's Avatar
Moderator
Advanced cPanel/WHM User
 
Join Date: Sep 2002
Location: Toronto, Ontario Canada
Posts: 2,768
dgbaker is on a distinguished road
Quote:
Originally Posted by cooldude7273
Off topic, but I am the Number1Host

Why did you not register it?
__________________
Regards,
David
Forum Moderator

Alternate Support? http://www.cpanelhosts.com
Looking for a server? http://www.myvirtualhosting.com
Get Dedicated in Toronto at MVH.
We are a licensed cPanel PartnerNoc
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 05-28-2006, 08:03 PM
Registered User
 
Join Date: Jan 2004
Location: Roswell, GA
Posts: 363
cooldude7273 is on a distinguished road
Quote:
Originally Posted by dgbaker
Why did you not register it?
I don't think I was Number1Host when I signed up here, not a big deal to me though.
__________________
Number1Host.net
Shared, Reseller, and Dedicated Hosting
Server Setup, Management, and Security
The Web's Number 1 Host - Number1Host.net
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 05-28-2006, 08:07 PM
Registered User
 
Join Date: Apr 2003
Location: Norway
Posts: 23
numberonehost
Well I registered in Apr 2003 with that nick (and domain) so I think I was before you Though we have changed name since then.

But on topic, someone here able to answer?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 05-28-2006, 08:15 PM
Registered User
 
Join Date: May 2006
Posts: 11
pilot51198 is on a distinguished road
Talking

Quote:
Originally Posted by numberonehost
If a cpanel server is running PHP as a module in Apache I will be able to read/edit other peoples files if (assuming that apache runs with user nobody):
I upload a CGI/PHP script so that it is owned by user nobody. PHP will then be restricted by safe_mode or open_basedir, but CGI will not be restricted by anything. If another account on the same server has files owned by user nobody, I will have full access to these using CGI (and might have access with PHP depending on safe_mode/open_basedir).

Are my assumtions correct? I'm writing a master thesis so I would really appreciate if anyone could reply
I think you're correct. Of course this is basing upon simular ways I do this. Although not too sure about every single detail with 'safe_mode/open_basedir' . Since I prefer to let my clients edit their own files and their sites, I find myself just leaving things alone.

Quote:
Originally Posted by cooldude7273
Off topic, but I am the Number1Host

Lol, I thought I was the World's Number 1 hosting Company. Well, I'm at least one of the best in support.... oh well, btw nice site you have there numberonehost!
__________________
Get your domain name today! .COMs from just $7.95/yr! Sign up today!-- http://www.widenationhost.com/

Sales Dept: sales@widenationhost.com
Support Forum: http://widenationhost.com/forums/index.php

All domain transfers and renews are just $6.95 for a limited time. Regular price domains for $3.99 with purchase of non-domain product such as our hosting plans which start at $4.95/mo.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 05-28-2006, 08:19 PM
Registered User
 
Join Date: Jan 2004
Location: Roswell, GA
Posts: 363
cooldude7273 is on a distinguished road
Nonono, you see, I am the Number1Host

See?
__________________
Number1Host.net
Shared, Reseller, and Dedicated Hosting
Server Setup, Management, and Security
The Web's Number 1 Host - Number1Host.net
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 05-29-2006, 11:43 AM
Registered User
 
Join Date: Apr 2003
Location: Norway
Posts: 23
numberonehost
Quote:
btw nice site you have there numberonehost!
Thanks BTW I got forbidden on your pages?

So this is basically possible:
If a file "file" in
/home/userA/public_html/file
is owned by nobody and a directory "dir" in
/home/userB/public_html/dir
is owned by nobody (and all the subdirs and files), then userA would have access to everything within directory dir of userB?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 05-29-2006, 11:51 AM
Registered User
 
Join Date: Jan 2004
Location: Roswell, GA
Posts: 363
cooldude7273 is on a distinguished road
As long as you have open_basedir enabled, you won't have a problem.
__________________
Number1Host.net
Shared, Reseller, and Dedicated Hosting
Server Setup, Management, and Security
The Web's Number 1 Host - Number1Host.net
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 05-29-2006, 12:18 PM
chirpy's Avatar
Moderator
 
Join Date: Jun 2002
Location: Go on, have a guess
Posts: 13,495
chirpy will become famous soon enough
That's not true. If you have open_basedir enabled it makes it a tiny bit more tricky, but it's trivial to bypass.
__________________
Jonathan Michaelson
cPanel Forum Moderator

Need your cPanel servers secured and tuned?
cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
http://www.configserver.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11 (permalink)  
Old 05-29-2006, 01:31 PM
Registered User
 
Join Date: Jan 2004
Location: Roswell, GA
Posts: 363
cooldude7273 is on a distinguished road
^^ What he said. Chirpy > cooldude
__________________
Number1Host.net
Shared, Reseller, and Dedicated Hosting
Server Setup, Management, and Security
The Web's Number 1 Host - Number1Host.net
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 05-29-2006, 02:36 PM
Registered User
 
Join Date: Apr 2003
Location: Norway
Posts: 23
numberonehost
So to sum up my assumtion is correct?

Thank you all for your answers so far
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 08:23 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
© cPanel Inc