我正试图在中安装一个“7”的laravel项目。
我跟踪了这个博客:http://tecadmin.net/install-laravel-framework-on-centos/
完成laravel项目下载,设置用户"apache“和组"apache”的用户权限。在这一切之后,我得到的错误是
Error in exception handler: The stream or file "/var/www/html/project/app/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied in /var/www/html/project/bootstrap/compiled.php:9072以前有过这个问题的人,会提到解决方案是为日志文件设置了适当的权限。我已经验证了app/存储文件夹具有正确的权限。
我知道我错过了一些很简单的东西,但却无法做到这一点。
任何帮助都将不胜感激。
更新:--这些是我应用的权限:
chown -R apache:apache project
chmod 775 project
chmod 775 project/app/storage
chmod -R 777 project/app/storage这些是我可以看到的文件夹的权限:
drwxrwxr-x. 7 apache apache 4096 Dec 23 13:54
drwxrwxr-x. 7 apache apache 84 Dec 23 13:53 storage
-rwxrwxrwx. 1 apache apache 0 Dec 23 14:01 laravel.log发布于 2014-12-24 02:34:48
无法确定这是否是RHEL 7的问题。过了一段时间,我放弃了这一点,用centOS 6创建了一个VM,它现在正在正常工作。谢谢@ykbks帮了我这个忙。
发布于 2015-04-08 13:12:56
需要禁用SELinux。
~]# cat /etc/sysconfig/selinux
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
# SETLOCALDEFS= Check local definition changes
SETLOCALDEFS=0将SELINUX的值更改为禁用将更改SELinux的状态和下次系统启动时要使用的策略的名称。
https://stackoverflow.com/questions/27623421
复制相似问题