問題描述:
在 centos 上搭建環境時,無論如何修改用戶權限為 777 或者 755 、變更文件所屬用戶, laravel 框架總是報錯 “The stream or file “/var/www/laravel56/storage/logs/laravel.log” could not be opened: failed to open stream: Permission denied”。
解決方法:
關閉selinux即可。
編輯?/etc/selinux/config?文件,將?SELINUX?項修改為:SELINUX=disabled
#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?-?No?SELinux?policy?is?loaded.? SELINUX=disabled? #?SELINUXTYPE=?can?take?one?of?these?two?values:? #?targeted?-?Only?targeted?network?daemons?are?protected.? #?strict?-?Full?SELinux?protection.? SELINUXTYPE=targeted
推薦教程:centos教程
? 版權聲明
文章版權歸作者所有,未經允許請勿轉載。
THE END
喜歡就支持一下吧
相關推薦