chown/chgrp not working
| From: | Paul Warner | Date: | Fri, 30 Nov 2001 15:23:50 +0000 |
| Subject: | chown/chgrp not working | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-76210@lists.php.net to get a copy of this message | ||
I have a client that I made a image uploader/thumbnailer for
that insists on using FrontPage. In order to make FP
happy, I need to set the owner to 'nobody' and the group
to 'site3' which are uid 99 and gid 117. The uploaded file
is set as httpd/root and the thumbnail created by the script
comes out httpd/site3.
First I tried:
chown($file_name, 99);
chgrp($file_name, 117);
Next I tried:
chown($file_name, '99');
chgrp($file_name, '117');
This fails to get the uid or gid, so the first syntax appears
to be correct.
Finally I tried:
chown($file_name, 'nobody');
chgrp($file_name, 'site3');
Error message for first and third attempts is identical:
Warning: chown failed: Operation not permitted in
/home/sites/site3/web/dev/maintenance.php on line 191
Why is it 'not permitted' and how do I allow it?
-- Paul