原文連接:http://blog.csdn.net/dyw/article/details/6612497apache
近日,在Apache2環境下部署Rails3應用時碰到此錯誤:ubuntu
Permission denied: [某路徑]/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable瀏覽器
此時,在瀏覽器中不論是訪問Rails3應用的根目錄仍是次級目錄都會獲得「403 - Forbidden」錯誤。查看apache2的error.log文件時會發現相似上面的信息。含具體路徑的錯誤信息爲:app
Permission denied: /home/ubuntu/sites/myapp/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable.net
此時,只需修改一下目錄屬性便可解決問題,即:blog
chmod +x -R /home/ubuntu/sites/myapp部署