Page 1 of 1
chmod & chown permissions
Posted: Fri Jun 06, 2003 1:53 pm
by daven
I am attempting to use PHP's chmod() and chown() commands, but I receive the "Operation not permitted" error whenever I try to do so. The parent directory is chmod'ed rwx for all (0777).
Is there a way to get chmod to work?
Posted: Fri Jun 06, 2003 2:10 pm
by easyteck
Well, maibe you're using php with Apache, so when script executes generally uses the user that is defined in httpd.conf file (apache)... you can change this user to try (I never did) but understand that this is a big security problem... 'cause this new apache user must have the chmod and chown permissions and anyone that uses a connection using your apache server could do the same things!!!
Posted: Fri Jun 06, 2003 2:16 pm
by nielsene
Well if the directory is 777 then any user should be able to issue the commands. Have you checked the safe_mode setting in php.ini?