文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>PermissionDenied

PermissionDenied

时间:2007-07-11  来源:opbsder

Permission Denied

Error 13 indicates a filesystem permissions problem. That is, Apache was denied access to a file or directory due to incorrect permissions.

On *nix systems, use ls -l to see the current permissions, and see man chmod for details on fixing these.

GNU based systems often have a namei program that helps in viewing the permissions of a complete path.

Make sure that the file to which permission was denied is at least readable by the Apache user (eg -r--r--r-- or 444 as a minimum. -rw-r--r-- or 644 is more usual).

Directories and scripts also need to be 'executable' (dr-xr-xr-x or 555. drwxr-xr-x or 755 is more common). This includes all parent directories of a resource too!

On Linux, you can use the namei command to return permissions of everything in the path to the target file or directory.

namei -m /usr/local/apache/httpd/dir1/dir2/index.html 

DO NOT set files or directories to mode 777, even "just to test", even if "it's just a test server". The purpose of a test server is to get things right in a safe environment, not to get away with doing it wrong.

setenforce 0 can be used to test if this is caused by a SELinux issue - in that case, use chcon to fix permissions. Use ls -alZ to view current permissions on such systems.

相关阅读 更多 +
排行榜 更多 +
辰域智控app

辰域智控app

系统工具 下载
网医联盟app

网医联盟app

运动健身 下载
汇丰汇选App

汇丰汇选App

金融理财 下载