Page 1 of 1

chmod failed:operation not permited

Posted: Wed Jul 17, 2002 3:21 am
by Fábio Selinger
im brazilian and my english is poor...

when i try to change the permissions of the any file, the browser show me its:

warning:chmod failed:operation not permited.

what the problem :?: :?: :?:

Posted: Wed Jul 17, 2002 3:33 am
by will
someone correct me if i get off a little bit here....

(assuming you're using apache)...

in the apache config file, you specify a user for apache to run as... often something like 'apache' or 'nobody'. this is the "user" that is attempting to chmod your files via the PHP function. say for example you have a file with the following permissions.

Code: Select all

-rwxr-xr-x    1 will    users    5288 Jun 19 14:23 index.php
if apache is running as user 'nobody' in group 'nogroup' (the default i believe), you would be unable to chmod this file since 'nobody' doesn't have permission to do anything. there is a configuration option to allow you to chmod things as root (--suexec i think), but it can cause quite a security risk.

Posted: Wed Jul 17, 2002 5:24 am
by twigletmac
You don't say which operating system you're running but if it's Windows you should note this about chmod():
php manual wrote:Note: This function is not implemented on Windows platforms.
Mac

Posted: Wed Jul 17, 2002 7:02 am
by volka
on windows (at least w2k) unknown chmod-values simply have no effects. No error, no warning so far

Posted: Wed Jul 17, 2002 8:31 am
by kenny
yes, what volka and twigletmac said. I used to have the same problem, because I recently found out that my host uses windows, and you do not have to set permission.s :D

???

Posted: Sun Jul 28, 2002 2:48 pm
by Fábio Selinger
My host uses linux/apache
and i not found the solutions...