Changing permissions via chmod at runtime errors with “Operation not permitted”
问题 When I use chmod() to change permissions at run time, it gives me the below message: Warning: chmod() [function.chmod]: Operation not permitted in /home/loud/public_html/readalbum.php How can I remove this error and make the chmod function work? 回答1: $ sudo chmod ... You need to either be the owner of the file or be the superuser, i.e., user root . If you own the directory but not the file, you can copy the file, rm the original, then mv it back, and then you will be able to chown it. The