Permission denied: /.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable

来源:互联网 发布:简易流程图制作软件 编辑:程序博客网 时间:2024/06/02 03:20

近日,在Apache2环境下部署Rails3应用时碰到此错误:
Permission denied: [某路径]/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
此时,在浏览器中不管是访问Rails3应用的根目录还是次级目录都会得到“403 - Forbidden”错误。查看apache2的error.log文件时会发现类似上面的信息。含具体路径的错误信息为:
Permission denied: /home/ubuntu/sites/myapp/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable
此时,只需修改一下目录属性即可解决问题,即:
chmod +x -R /home/ubuntu/sites/myapp