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

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Feedback/Feature Requests > [solved] Cloudlinux PHP LSAPI "say no to suexec"

Reply
 
Thread Tools Display Modes
  #1  
Old 04-01-2012, 06:44 PM
QuantumNet QuantumNet is offline
Senior Member
 
Join Date: Nov 2007
Posts: 61
Default [solved] Cloudlinux PHP LSAPI "say no to suexec"

Okay well here is a question for you, I have been in a long discussion with Igor regarding suexec vs lsapi php security... Because we are using CageFS the user can only see their own files... but if you use suexec then and attacker can delete a customers site and or easily add malicious code to their files.

Because CageFS already provides the benefit of preventing a user from accessing the other users files, couldnt we just cage php lsapi and not use suexec

here is Igor's response:

You can check with LiteSpeed regarding doing LVE/CageFS without suexec. I believe they might be able to do CageFS without suexec, as they still terminate apache request after it served the request.


Either that or add a suexec ForceUID option just like you have the forcegid option... that way even though we are in suexec mode the user can be forced to something different than the user that owns the files..... this way it since suexec already work in cagefs it would be a no brainer to prevent deletion of files


But isnt it true that LVE controls dont work in suexec mode? so wouldnt my above recommendation of CageFS +php lsapi work with LVE???

Last edited by NiteWave; 09-24-2012 at 07:21 PM..
Reply With Quote
  #2  
Old 04-28-2012, 03:15 PM
QuantumNet QuantumNet is offline
Senior Member
 
Join Date: Nov 2007
Posts: 61
I love that this product costs $45 a month for a 2cpu license per server... but you cannot even get a response from the staff....

This was once a promising product and I am quickly losing faith in your company
Reply With Quote
  #3  
Old 04-30-2012, 08:41 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,339
Quote:
Originally Posted by QuantumNet View Post
Okay well here is a question for you, I have been in a long discussion with Igor regarding suexec vs lsapi php security... Because we are using CageFS the user can only see their own files... but if you use suexec then and attacker can delete a customers site and or easily add malicious code to their files.
...
But isnt it true that LVE controls dont work in suexec mode? so wouldnt my above recommendation of CageFS +php lsapi work with LVE???
suEXEC needs to be enabled for CageFS to work. pls pm the steps to reproduce the issue so we can look into it.
Reply With Quote
  #4  
Old 05-01-2012, 02:32 PM
QuantumNet QuantumNet is offline
Senior Member
 
Join Date: Nov 2007
Posts: 61
I know it currently needs to be enabled... That was not my request... I made a feature request... There is no bug report that needs to ne submitted...

Please take the time to read the request.
Reply With Quote
  #5  
Old 05-01-2012, 02:46 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,339
Quote:
Originally Posted by QuantumNet View Post
... but if you use suexec then and attacker can delete a customers site and or easily add malicious code to their files.

...
can you be more specific about this? hence my previous request.
Reply With Quote
  #6  
Old 05-01-2012, 03:16 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Quote:
Originally Posted by QuantumNet View Post
Okay well here is a question for you, I have been in a long discussion with Igor regarding suexec vs lsapi php security... Because we are using CageFS the user can only see their own files... but if you use suexec then and attacker can delete a customers site and or easily add malicious code to their files.

Because CageFS already provides the benefit of preventing a user from accessing the other users files, couldnt we just cage php lsapi and not use suexec

here is Igor's response:

You can check with LiteSpeed regarding doing LVE/CageFS without suexec. I believe they might be able to do CageFS without suexec, as they still terminate apache request after it served the request.


Either that or add a suexec ForceUID option just like you have the forcegid option... that way even though we are in suexec mode the user can be forced to something different than the user that owns the files..... this way it since suexec already work in cagefs it would be a no brainer to prevent deletion of files


But isnt it true that LVE controls dont work in suexec mode? so wouldnt my above recommendation of CageFS +php lsapi work with LVE???
Yes, it is on our to-do list of our lsphp suEXEC daemon development, will be in our 4.2 release.
Reply With Quote
  #7  
Old 05-08-2012, 06:53 PM
QuantumNet QuantumNet is offline
Senior Member
 
Join Date: Nov 2007
Posts: 61
What we were asking is for lsapi php to be caged within cagefs... suexec = bad

and this is why:

any site running suexec is easily hacked because all files are writable by the user so an attacker can install backdoors all over the place even inject malicious code into good code etc

The purpose of suexec is to prevent a php process from reading other users on the files.. but cagefs already does this.

So with lsapi php + cagefs is more secure than using suexec because with this combination no one can read others files and files cannot be written to because php does not execute as the files owners.

CageFS + lsapi php solves the security concerns e have been battling with for years.


Please make lsapi php caged in cagefs not suxec + cagefs
Reply With Quote
  #8  
Old 05-25-2012, 02:48 AM
QuantumNet QuantumNet is offline
Senior Member
 
Join Date: Nov 2007
Posts: 61
any update?
Reply With Quote
  #9  
Old 09-12-2012, 11:37 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
This mode has been added in LSWS 4.2 with PHP suEXEC daemon mode.
http://blog.litespeedtech.com/2012/0...c-daemon-mode/

Once enabled PHP suEXEC daemon mode, you can change "Enable LVE" configuration to "CageFS without suEXEC". If cagefs is disabled for that user or failed to enter the cage, PHP will change user ID (back to default suEXEC mode).
Reply With Quote
  #10  
Old 09-20-2012, 03:59 AM
QuantumNet QuantumNet is offline
Senior Member
 
Join Date: Nov 2007
Posts: 61
This is amazing, it solves security for both server and customer, no longer will people have to settle on a half arse bandaid solution like suexec or suphp

tested and working though you might want to note, for it to work because it forces group nobody... on directadmin servers you must turn off secure access group


@mistwang

thank you so much, is there a chance we can define the group it operates in, instead of group nobody, so we can continue to use secure access group setting in directadmin? its sort of redundant but would be nice to have for users are not mounted in cagefs

Last edited by QuantumNet; 09-20-2012 at 04:01 AM..
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

Forum Jump


All times are GMT -7. The time now is 04:42 PM.



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