权限问题 – 用户无法再访问主index.php

从/ var / www,我执行“chmod -R 774”。 现在没有我的.php脚本可以访问。 从我的浏览器,当我inputmydomain.com或mydomain.com/test2.php或mydomain.com/test.php,我得到403 Forbidden错误消息。

所以,我把3个.php脚本的权限改为775,但这也没有帮助。

这里是“ls -la / var / www”的输出:

drwxrwxr– 6约翰轮4096 2010-09-29 17:38

drwxr-xr-x 14 root root 4096 2010-09-27 21:15

-rwxrwxr-x 1 john wheel 3353 2010-09-29 05:29 index.php

-rwxrwxr-x 1 john wheel 124 2010-09-27 23:12 .htaccess

-rwxrwxr-x 1 john john 34 2010-09-29 17:39 test2.php

-rwxrwxr-x 1 john john 26 2010-09-28 22:08 test.php

.htaccess文件做了一个URL mod_rewrite,因此不需要在index.php中input。

谢谢你的帮助。

目录中需要755(注意“其他”缺less'x')

networking服务器访问“其他”的上下文(它不是在组中,也不是“约翰”也不是“根”)。 因此在目录中需要“x”作为“others”才能访问目录的内容。 然后每个需要“执行”的脚本都需要“x”作为“其他”,例如通过URL直接访问。