LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > General > Set open_basedir directive per user

Reply
 
Thread Tools Display Modes
  #1  
Old 02-22-2011, 03:46 AM
firehost_thomas_z firehost_thomas_z is offline
New Member
 
Join Date: Feb 2011
Posts: 1
Default Set open_basedir directive per user

Hello everyone,

Is there a way to wrap the lsphp5 process so that open_basedir may be set similar to this php-cgi wrapper that works in conjunction with suexec:
#!/bin/sh
HOMEDIR=`grep ":$UID:" /etc/passwd | cut -d: -f6`
ARGS="-d safe_mode=0 -d open_basedir=/tmp/:$HOMEDIR/httpdocs/"
exec /usr/bin/php-cgi $ARGS

This operates the way it should using old school mod_php or mod_fastcgi but we want to use lsapi/lsphp -- that is what makes litespeed so great!

Regards,
Thomas Z
Reply With Quote
  #2  
Old 02-22-2011, 10:21 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
open_basedir works with lsphp, just like with mod_php.
Just override open_basedir with php_admin_value in the vhost configuration. that's the way cPanel generate the vhost configurations.
Reply With Quote
  #3  
Old 02-24-2011, 10:39 PM
tommynsong tommynsong is offline
Member
 
Join Date: Mar 2010
Posts: 12
that would require manually touch every vhost, is there any dynamic approach to secure this?
Reply With Quote
  #4  
Old 02-25-2011, 12:06 AM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,227
I think no such dynamic way like php-cgi you showed in first post.

while in .htaccess, you can put
php_value open_basedir /home/mydomain/public_html:/tmp
in lsws + lsphp, but not available in php-cgi way.

also in lsws php suExec mode, each account can have its own unique php.ini, to set everything include open_basedir.

I think they are just different approaches.
Reply With Quote
Reply

Tags
arguments, lsphp, open_basedir

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

Forum Jump


All times are GMT -7. The time now is 10:05 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.