Chmod (): Operationnotpermittedinphpscript. A PHP script. if a newly registered user uploads a file, mkdir (New folder of the user name), chmod (upload in this folder, 0777 ). error message Returned & nbsp; chmod (): & nbsp; Operation & nbsp; not & nbsp; permitted & nbsp; in & nbsp; chmod (): operation not permitted in php script.
A PHP script. if a newly registered user uploads a file, mkdir (New folder of the user name), chmod (upload in this folder, 0777 ).
The result shows the error chmod (): Operation not permitted in a line of the php script.
SSH checks the permission for uploading files. if you do not use chmod, the default value is 0644. The reason why I want to change the file to 0777 permission is that the user can modify it if he is not satisfied with the upload.
This is probably the PHP script.
If ($ _ POST ['file']) {
// Mkdir () file_put_content () chmod () mysql_query ()
}
------ Solution ----------------------
Set the permission to chmod a + x