以前用的比較多的 Linux
是 Ubuntu
口四,今天在 CentOS
上搭建環(huán)境時(shí)無(wú)論如何修改用戶權(quán)限為 777
或者 755
孵运、變更文件所屬用戶, Laravel
框架總是報(bào)錯(cuò) "The stream or file "/var/www/laravel56/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied"
最終找到問題根源:
是selinux 開啟造成的治笨,具體selinux的介紹大家可以自行百度
解決辦法:
編輯
/etc/selinux/config
文件驳概,將SELINUX
項(xiàng)修改為: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
問題解決!
由于本人學(xué)藝不精旷赖,未盡之處還望海涵顺又,有誤之處請(qǐng)多多指正,歡迎大家批評(píng)指教
本文 完