Hi ,
I keep getting this error :
chmod(): Operation not permitted
whenever i try to chmod any file using this code in a php file : chmod($filename,0777);
I thought this might be because user " nobody " is not owning these files so i try to do this : chown($filename,nobody);
chmod($filename,0777);
but then i start getting two errors .. chown(): Operation not permitted
& chmod(): Operation not permitted
Now I wish to know where i am going wrong and what could be the possible solution for this?
Is it because my web hosting guy as configured "nobody" user with no chmod rights? or is it my coding .. hehehe
PS: I don't want to use exec("chmod 0777 file.txt"); cause it is not secure and is resource hungry command too..
I have tried to by setting my parent and all its sub directories permission to 0777 by ftp too but doesn't solves my problem.
Note : I can create directories using php file and command mkdir too. (just wondering if "nobody" is allowed to create directories then why can't change chmods?)
Thanxs in Advance