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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php