How to chmod the folder to make it writable for the server in php

倖福魔咒の 提交于 2019-12-13 03:22:51

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!