Issue
it happens often that an silverstripe installation does not have the right permission to write in the assets folder - e.g. for saving resampled images...
I wonder what is the best permissions setting for the files and folders in assets/ to solve that problem. you read so many different things when you google...
can I just chmod the whole assets folder and its contents to 0777? or do files and folders need different permissions? is there an recommendation for Owner and Group? can I have "dangerous" settings?
Solution
Rule of thumb:
- Stuff the webserver needs to write (
assets/
,silverstripe-cache/
) need to be writable by the server - Stuff the webserver needs to read (framework, cms, modules, custom code,...) should only be readable by the server
chmod 777
will work for the writeable parts, but you might want to set the folder's owner to the webserver's user (www-data, nobody, or whatever this is on your system) plus chmod 755
to avoid global write permissions.
Answered By - xeraa Answer Checked By - Terry (WPSolving Volunteer)