简体   繁体   English

Apache中的权限被拒绝,而不是777

[英]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.

相关问题 即使在Allow From All和Chmod 777之后,解决了403权限也拒绝了Apache的错误? - Solving 403 permission denied error on Apache even after Allow From All and Chmod 777? fopen对具有777权限的文件的权限被拒绝 - fopen Permission denied on a file with 777 permissions 无法打开流:权限被拒绝,设置为777但未运行 - failed to open stream: Permission denied in set to 777 but not running 在PrestaShop中拒绝了PHP权限,甚至chmod 777都不起作用 - PHP Permission denied in PrestaShop, not even chmod 777 working 777文件夹上的move_uploaded_file权限被拒绝 - move_uploaded_file permission denied on 777 folder 设置 CHMOD 777 后 /bin/node 权限被拒绝 - /bin/node permission denied after setting CHMOD 777 当尝试在具有777权限的目录中执行mkdir()时,我获得了拒绝权限 - When trying to mkdir() in a directory with 777 permissions I get permission denied 777我的整个应用程序出现“无法打开流:权限被拒绝” - “failed to open stream: Permission denied” after 777 my entire app file_put_contents权限被拒绝-没有777的解决方案吗? - file_put_contents permission denied — any solution without 777? 解决fopen()-没有777的远程服务器上的权限被拒绝 - Solving fopen() - permission denied on remote server without 777
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM