[英]Permission denied in Apache instead of 777
I am having a hard time deploying a PHP website built using Grav on CentOS. 我很难在CentOS上部署使用Grav构建的PHP网站。
Whenever I try to open the website I get 500 Server Error. 每当我尝试打开网站时,都会出现500服务器错误。 The logs say:
日志说:
Uncaught exception 'RuntimeException' with message 'Creating directory '/var/www/html/glug_site/cache//compiled/files' failed on error mkdir(): Permission denied' in /var/www/html/glug_site/vendor/rockettheme/toolbox/File/src/File.php:420\nStack trace:\...
I followed the guide mentioned here but it didn't helped. 我按照此处提到的指南进行操作,但没有帮助。
Then, I did chmod 777 -R glug_nith/
but still it doesn't work. 然后,我做了
chmod 777 -R glug_nith/
但仍然无法正常工作。 I even logged into apache
user using sudo -u apache bash
to see if I am able to create folders and files inside myapp and I was successful. 我什至使用
sudo -u apache bash
登录到apache
用户,以查看是否能够在myapp内创建文件夹和文件,并且成功。 I tried deleting the .htaccess
file to see if that would help but it didn't. 我尝试删除
.htaccess
文件以查看是否有帮助,但没有帮助。
I cannot understand instead of having all the permission why its showing permission denied. 除了拥有所有权限外,我无法理解为什么其显示权限被拒绝。 Also I couldn't find any thing that might be blocking the permission.
另外,我找不到任何可能阻止权限的东西。 Please help.
请帮忙。
try uncommenting the 12th line in ur .htaccess file 尝试取消注释您的.htaccess文件中的第12行
Modify this 修改这个
# RewriteBase /
to 至
RewriteBase /
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.