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

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > posix_getuid is pointing to httpd instead of user from vhost

Reply
 
Thread Tools Display Modes
  #1  
Old 02-04-2013, 07:32 AM
bobykus bobykus is offline
Senior Member
 
Join Date: Sep 2012
Posts: 73
Default posix_getuid is pointing to httpd instead of user from vhost

Is it normal?
When I run a script like


<?php
if (touch("/tmp/111")) {
echo $filename . ' modification time has been changed to present time';
} else {
echo 'Sorry, could not change modification time of ' . $filename;
}
echo posix_getuid()."\n";
echo posix_geteuid()."\n";

phpinfo();
?>

results are

ls -la /tmp/111
-rw-r--r-- 1 httpd httpd 0 Feb 4 16:28 /tmp/111

modification time has been changed to present time 398 398


php compiled with Server API LiteSpeed V6.1, it is running PHP suEXEC / suEXEC Daemon.
Reply With Quote
  #2  
Old 02-04-2013, 09:56 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
Where did you put the script?
You can check the user PHP running as with command

ps -ef | grep php

also, have you tried PHP suEXEC without suEXEC daemon?
Reply With Quote
  #3  
Old 02-04-2013, 11:50 AM
bobykus bobykus is offline
Senior Member
 
Join Date: Sep 2012
Posts: 73
This is strange part - ps shows lsphp runnin under user privlgs.
Script is in document root of web site configured and exported from apache.
I'll do suexec with out demonizing.

Last edited by bobykus; 02-04-2013 at 12:39 PM..
Reply With Quote
  #4  
Old 02-05-2013, 11:48 AM
bobykus bobykus is offline
Senior Member
 
Join Date: Sep 2012
Posts: 73
Yeah, solution is just do not upgrade to latest
Reply With Quote
  #5  
Old 02-05-2013, 12:17 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
should have been fixed in latest build of 4.2.2, please do force update.
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 02:32 AM.



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