[英]The stream or file "...\storage\logs/laravel.log" could not be opened in append mode: Failed to open stream: Permission denied
[英]laravel centOS 8 "log file could not be opened in append mode: failed to open stream: Permission denied”
通常在 ubuntu 中將所有權更改為www-data
和775
權限可以解決此問題。 但在 centos 8 中,這似乎還不夠。 我所做的是——
沒有任何工作。 該怎么做才能解決這個問題?
從項目根文件夾嘗試:
sudo chmod -R gu+w storage/
sudo chmod -R guo+w storage/
sudo chmod -R gu+w bootstrap/cache/
sudo chmod -R guo+w bootstrap/cache/
在 CentOS 我剛剛解決了這個問題: chcon -R -t httpd_sys_rw_content_t storage/
原來問題出在selinux上
這對我有用
chcon -R -t httpd_sys_rw_content_t /path/to/log/directory
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.