The stream or file "/data/www/laravel/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied


转载至:https://cloud.tencent.com/developer/ask/170024

Linux 部署 Laravel项目,运行报错

The stream or file "/data/www/laravel/storage/logs/laravel.log" could not be opened: failed to open stream: Permission denied

网上找到如下解决方法,测试有效

 

Web服务器用户和组依赖于你的Web服务器和操作系统。找出你的Web服务器用户和组使用以下命令的内容。对于nginx使用:

ps aux|grep nginx|grep -v grep

用于apache:

ps aux | egrep '(apache|httpd)'

cd /data/www/laravel/ 目录执行

chown -R $USER(用户):web用户组 storage


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM