V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
xinkiang
V2EX  ›  问与答

apache访问权限的诡异表现,纠结了好久都木有结果

  •  
  •   xinkiang · 2011-09-21 23:26:44 +08:00 · 4386 次点击
    这是一个创建于 4618 天前的主题,其中的信息可能已经有所发展或是发生改变。
    httpd.conf中的部分信息:

    DocumentRoot "/var/web"
    <Directory "/var/web">
    Options Indexes FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
    </Directory>


    在/var/web目录下执行ls -l的结果
    -rwxrwxrwx. 1 apache root 22 9月 22 22:28 index2.php
    -rwxrwxrwx. 1 apache root 22 9月 22 22:44 info.php

    可在浏览器上http://localhost/index2.php能正确显示,而http://localhost/info.php却显示403
    Forbidden
    You don't have permission to access /info.php on this server.

    纠结了一天啊有木有!Help ! !
    4 条回复    1970-01-01 08:00:00 +08:00
    dongsheng
        1
    dongsheng  
       2011-09-21 23:30:41 +08:00
    > AllowOverride All

    这个目录里没有藏着个.htaccess吧?
    xinkiang
        2
    xinkiang  
    OP
       2011-09-21 23:34:53 +08:00
    @dongsheng 没有,目录是新建的~
    micate
        3
    micate  
       2011-09-22 00:14:02 +08:00
    shell 里面执行这个结果是?
    sestatus

    还有 info.php 里面是什么,有 header() 之类的操作么?
    xinkiang
        4
    xinkiang  
    OP
       2011-09-22 00:25:15 +08:00
    @micate index2.php和info.php里面是相同的内容....

    找到答案了,http://hi.baidu.com/lkx229/blog/item/b07a71d5229d7414a18bb7c7.html

    谢谢@dongsheng 和 @micate 的回答哈!
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1401 人在线   最高记录 6547   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 17:21 · PVG 01:21 · LAX 10:21 · JFK 13:21
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.