Urb Lejeune wrote:
I could do this in perl but I'm being stubborn :-)It works fine with PHP 4.2.2 from the command line run as root on my Linux system (using a user on my system) produced:
When I run the following code as a regular user, everything fails.
When I run it as root the directory is created and the chmod
works. However, chown reports:
chown failed: Operation not permitted
Here is the code.
$Directory2Create = "/home/e-govdemo/htdocs";
mkdir($Directory2Create,0777);
chown($Directory2Create,"egovdemo");
chmod($Directory2Create,0777);
"egovdemo" is a legal user name as can be seen from this partial
directory listin.
egovdemo nobody 4096 Sep 6 11:29 Logs
also tried
chown($Directory2Create,"egovdemo:nobody");
chown($Directory2Create,"637");
chown($Directory2Create,"637:99");
To help save my few reamining hairs and could someone with
root privilege try it and see if it's me or PHP?
Thanks
Urb
drwxrwxrwx 2 leagas root 4096 Jan 23 16:43 test
Peter
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php