store | blogs | forums | twitter | facebook | wiki | mailing lists | downloads | support portal
Atomic Secure Linux
It is currently Fri May 24, 2013 11:36 am

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]




Post new topic Reply to topic Share/Bookmark  [ 7 posts ] 
Author Message
 Post subject: what about mod_chroot for apache?
Unread postPosted: Fri Jan 16, 2009 12:34 pm 
Offline
Forum User
Forum User

Joined: Wed Jan 14, 2009 11:16 am
Posts: 23
url: http://core.segfault.pl/~hobbit/mod_chroot/

It would be very nice to also have a method to make a chroot per virtualhost, but I understand that's not possible right now.

At least with that module (mod_chroot) it's very easy to make a jail for apache.


Top
 Profile  
 
 Post subject:
Unread postPosted: Sat Jan 17, 2009 7:32 pm 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
User avatar

Joined: Thu Feb 07, 2008 7:49 pm
Posts: 3245
Location: Chantilly, VA
ASL actually can do this now. (For all of apache, not individual vhosts)

Just add this to your modsecurity config:

SecChrootDir /chroot/directory/for/apache

And your apache will be chrooted.

_________________
Michael Shinn
Atomicorp - Security For Everyone

Co-Author of Troubleshooting Linux Firewalls.


Top
 Profile  
 
 Post subject:
Unread postPosted: Sun Jan 18, 2009 4:47 pm 
Offline
Long Time Forum Regular
Long Time Forum Regular

Joined: Thu Dec 09, 2004 11:19 am
Posts: 1846
When I looked at this, the issue was that script paths would change (starting at the root of the chroot path).

So if you set it to /var/www/vhosts, all the scripts with paths set to /var/www/vhosts/domain.com (etc) will break because the /var/www/vhosts part would have been effectively lopped off.

I assume this is why it isn't set by default in ASL?

Faris.

_________________
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>


Top
 Profile  
 
 Post subject:
Unread postPosted: Tue Jan 20, 2009 7:25 pm 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
User avatar

Joined: Thu Feb 07, 2008 7:49 pm
Posts: 3245
Location: Chantilly, VA
Oh yeah, and also because a lot of things expect to be able to use /tmp /var/tmp /foo, etc. like PHP for instance.

_________________
Michael Shinn
Atomicorp - Security For Everyone

Co-Author of Troubleshooting Linux Firewalls.


Top
 Profile  
 
 Post subject:
Unread postPosted: Tue Jan 20, 2009 10:22 pm 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin

Joined: Wed Dec 31, 1969 8:00 pm
Posts: 7429
Location: earth
Or the perl/python/ruby/etc packages that use /usr/share or /usr/lib/perl. Probably not as big of a deal for the php only sites though. Theyd just lose access to pear and /tmp


Top
 Profile  
 
 Post subject:
Unread postPosted: Wed Jan 21, 2009 6:57 am 
Offline
Long Time Forum Regular
Long Time Forum Regular

Joined: Thu Dec 09, 2004 11:19 am
Posts: 1846
Essentially what you are saying is stick to suphp (or php-via-FastCGI in Plesk 9) :-)

Faris.

_________________
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>


Top
 Profile  
 
 Post subject:
Unread postPosted: Wed Jan 21, 2009 8:48 am 
Offline
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin

Joined: Wed Dec 31, 1969 8:00 pm
Posts: 7429
Location: earth
Probably the most hassle free implementation Ive seen so far is open_basedir in php. I realize obviously that there are hassles with it :p Point being everything else out there is even more work.

The other caveat here is that without a kernel level enforcement (grsec does this) on the chroot() function, its actually not a lot of work to get around what mod_chroot or mod_security would do to enforce it.

You'd definitely get utility out of it if you were doing cgi type hosting though. So I don't think its a bad thing. It would certainly let you constrain perl better than you can on a normal plesk box, much like you can with php's open_basedir.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic Share/Bookmark  [ 7 posts ] 

» Feed - Atomicorp

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group