Home  >  Article  >  Backend Development  >  osx - 在MAC OS X系统下架设的PHP+APACHE环境删除文件失败

osx - 在MAC OS X系统下架设的PHP+APACHE环境删除文件失败

WBOY
WBOYOriginal
2016-06-06 20:51:481344browse

刚开始使用MAC OX系统,架设了apache+php环境。程序中使用unlink和fopen方法操作文件时提示没有权限。使用命令chmod -R 755 system/cache 将要操作的文件设为-rwxr-xr-x 后,依然提示拒绝访问。请问正确的做法是什么?

——————————————————————
使用命令chmod -R 777 system/cache 貌似就解决了...

回复内容:

刚开始使用MAC OX系统,架设了apache+php环境。程序中使用unlink和fopen方法操作文件时提示没有权限。使用命令chmod -R 755 system/cache 将要操作的文件设为-rwxr-xr-x 后,依然提示拒绝访问。请问正确的做法是什么?

——————————————————————
使用命令chmod -R 777 system/cache 貌似就解决了...

chown -R _web ./system/cache
chmod -R 755 ./system/cache
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn