Apache权限被拒绝(权限755)

时间:2014-05-12 07:26:07

标签: apache permissions denied

我收到消息:

Forbidden 
You don't have permission to access / on this server.

Apache的路径是:/ var / www。我的配置(/etc/apache2/{apache.conf,httpd.conf})是正确的,因为在其他时候,它是有效的。文件夹/ var / www的权限是:755。

问题是:我删除了root(/ root)ant的主文件夹然后我有这个错误......

/ sites-available / 000-defaults的文件配置:

DocumentRoot /var/www/
<Directory /var/www/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>
        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>
        ErrorLog ${APACHE_LOG_DIR}/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog ${APACHE_LOG_DIR}/access.log combined

<Location /php/cron>
    Order Deny,Allow
    Deny from all
    Allow from localhost ip6-localhost 176.9.21.77
    Satisfy any
</Location>

Apache的错误日志:

  

(13)权限被拒绝:/.htaccess pcfg_openfile:无法检查   htaccess文件,确保它是可读的

1 个答案:

答案 0 :(得分:0)

解决方案是文件夹/ etc / apache2 /中的权限。我们需要将744级权限修改为755.