Hi. i recently noticed i can not use my Laravel projects on Manjaro somehow. it was working before i install virtual box and now i am facing this problem
The stream or file “/usr/share/nginx/yasan/storage/logs/laravel.log” could not be opened in append mode: Failed to open stream: Read-only file system The exception occurred while attempting to log:
I know it sounds duplicate but trust me. I tried every way i knew and nothing helped me.
So these are the config of everything:
Laravel v10
nginx
php-fpm
Manjaro : Kde plasma
My nginx user is “http”
same as the user and group used in my php-fpm config.
i used this command to change my root project’s owner:
A piece of advise - don’t ever change anything in /usr tree which is not in /usr/local/** - it is likely to be replaced or reset on the next system update.
Use /srv/http for websites.
Set owner and group to http
Use s to ensure files are handled in the context of the http user
Best practice is to use /srv/http/domain.tld for files served by a web service - but you should do what you see fit - following best practice will do you best in the long run.
Same practice for ftp, smb, nfs etc.
You use the s when you assign permissions - recursive is optional - only required if the target holds any content
cat php.ini | grep open_basedir ✔
; open_basedir, if set, limits all file operations to the defined directory
;open_basedir =
; Note: if open_basedir is set, the cache is disabled
I have no idea - sorry - but your issue could have been avoided all-together by following best practices - hosting your websites in the /srv/http/** structure.