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

Go Back   LiteSpeed Support Forums > External Applications > PHP > Permissions on PHP file uploads are a little weird.

Reply
 
Thread Tools Display Modes
  #11  
Old 02-26-2008, 11:55 AM
brettdavidsonnz brettdavidsonnz is offline
Member
 
Join Date: Nov 2007
Location: New Zealand
Posts: 27
Ownership is :

-r-sr-xr-x 1 root www 10780 Feb 14 16:17 lscgid.3.3.4
Reply With Quote
  #12  
Old 02-26-2008, 12:00 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
Looks correct.
Is there any security option in FreeBSD to disable setuid?
Is it possible to PM me a temp root ssh access?
Reply With Quote
  #13  
Old 02-26-2008, 12:06 PM
brettdavidsonnz brettdavidsonnz is offline
Member
 
Join Date: Nov 2007
Location: New Zealand
Posts: 27
There is but it is not utilised. (We have other programs running setuid successfully).

ssh access "PMed" to you. :-)
Reply With Quote
  #14  
Old 02-26-2008, 12:38 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
OK, after add environment variable "LSAPI_PPID_NO_CHECK" to lsphp5 external app configuration to prevent lsphp5 quit immediately, ps -aux shows that lsphp5 does run as "noc" user, so php suEXEC works properly.
Reply With Quote
  #15  
Old 02-26-2008, 12:47 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
FYI:
http://www.litespeedtech.com/support...ead.php?t=1587
Reply With Quote
  #16  
Old 02-26-2008, 12:57 PM
brettdavidsonnz brettdavidsonnz is offline
Member
 
Join Date: Nov 2007
Location: New Zealand
Posts: 27
OK then. Now back to the original question.

It appears that the owner is now noc when using the move_uploaded_file function. Weird. I didn't change anything. Good that it's working however.

The group is still wheel though.
I have setting the ForceGID option but this does not appear to work, even with a complete hard restart of the server.
Reply With Quote
  #17  
Old 02-26-2008, 12:59 PM
brettdavidsonnz brettdavidsonnz is offline
Member
 
Join Date: Nov 2007
Location: New Zealand
Posts: 27
Thanks for the above link. Now I understand why the user was wrong and why the PPID check fixes it.

Any ideas about group ownership?
Reply With Quote
  #18  
Old 02-26-2008, 01:06 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
Do you know how to check the gid of a process? maybe run "id" command from php script?

I just want to make sure the group id of lsphp5 is not "wheel". If it is, I will look into the code of lscgid.

BTW: please upgrade to 3.3.5 package first.
Reply With Quote
  #19  
Old 02-26-2008, 01:19 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
Have you change the ownership of files/directories under lsws/conf?
Code:
drwx------  2 root  www    512 Feb 14 16:17 cert
-rw-------  1 root  www   3320 Feb 14 16:17 mime.properties
drwx------  2 root  www    512 Feb 14 16:17 templates
It will break the web console, all should be owned by "www".
Reply With Quote
  #20  
Old 02-26-2008, 01:47 PM
brettdavidsonnz brettdavidsonnz is offline
Member
 
Join Date: Nov 2007
Location: New Zealand
Posts: 27
No. Web console was working this morning.

Since you've been on the system, I can no longer access the server configuration pages.
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 06:01 AM.



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