Blog

Laravel folder permissions

24-03-2021 · in snippets

Laravel requires some folders to be writable for the web server user. Using ACL
	// nginx = web server user
	// systemuser = your local/ssh user
	sudo setfacl -Rdm u:nginx:rwx,u:systemuser:rwx storage
	sudo setfacl -Rm u:nginx:rwx,u:systemuser:rwx storage
If you don't have ACL, you can use these but they're not so great;
	sudo chgrp -R www-data storage bootstrap/cache
	sudo chmod -R ug+rwx storage bootstrap/cache
source