Re: syntax woes

From: Date: Fri, 03 Apr 2009 03:04:08 +0000
Subject: Re: syntax woes
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.general 
Request: Send a blank email to php-general+get-291006@lists.php.net to get a copy of this message
Hi all, For any one following this thread, here is how I worked around the apache/php/chown limitation. script snippet (and if any one has a more elegant style, please share as I am an amateur script kiddie). $path = "/homes".$username; $chowncmd = "/usr/bin/sudo /bin/chown "; mkdir($path); chmod($path, 0775); exec($chowncmd.$username. " ".$path); I modified /etc/sudoers; #Defaults requiretty - I added the comment. apache ALL = NOPASSWD: /bin/chown - added this line. - aurf On Apr 2, 2009, at 6:58 PM, Michael A. Peters wrote:
Chris wrote:
Shawn McKenzie wrote:
Chris wrote:
Wow, it does chown and chmod as well, thats friggen cool.
chown will only work if the script is running as root which I doubt your drupal site will be.
Or if the script is running as a user/group that has write permissions to the dir/file that your trying to chown.
chmod may allow that, but not chown.
I believe it depends upon the operating system and version of the operating system. --PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.general (#291006) next »