Re: chown() despiration
| From: | Peter Clarke | Date: | Thu, 23 Jan 2003 16:55:06 +0000 |
| Subject: | Re: chown() despiration | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-132863@lists.php.net to get a copy of this message | ||
Urb Lejeune wrote:
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:I could do this in perl but I'm being stubborn :-)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 permittedHere 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 Logsalso tried chown($Directory2Create,"egovdemo:nobody"); chown($Directory2Create,"637"); chown($Directory2Create,"637:99");To help save my few reamining hairs and could someone withroot privilege try it and see if it's me or PHP? Thanks Urb
drwxrwxrwx 2 leagas root 4096 Jan 23 16:43 testPeter