问题
How to chmod the folder to make it writable for the server in php ?
I am using this function chomd as following
chmod("/images/original", 0750);
but still don't have the permission to write file . why ?
回答1:
If the user your webserver runs on has no write access then it most likely is not the owner of the file, and therefore it cannot change permissions either.
To allow write access on the file for your webserver process either change the ownership (chown
) or allow sufficient write permissions (chmod
) on a shell.
回答2:
try
chmod("/images/original", 0777);
来源:https://stackoverflow.com/questions/9432990/how-to-chmod-the-folder-to-make-it-writable-for-the-server-in-php