Laravel 权限被拒绝 Centos 7

Laravel permission denied Centos 7

我安装了 laravel 4.2,但最后遇到了这个错误

file_put_contents(/var/www/html/laravel4/app/storage/meta/services.json): failed to open stream: Permission denied

我认为 services.json 确实存在,但当我这样做时

php artisan up

错误变为

Error in exception handler: The stream or file "/var/www/html/laravel4/app/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied in /var/www/html/laravel4/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:87

我尝试授予存储和供应商文件夹权限,但似乎没有任何变化

php artisan cache:clear
chmod -R 777 app/storage
composer dump-autoload

我试图通过执行此命令来授予权限

setsebool -P httpd_unified 1 

我什至删除了项目并从头开始创建了多个副本似乎没有任何效果帮助我,我感到很迷茫。

我正在使用 Vmware Vsphere 访问服务器 从那里访问受到限制:( 最后通过从那里授予访问权限它起作用了

如果您使用 Vmware Vsphere 访问服务器,您应该授予它执行此操作的访问权限。