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?
Use the chmod command to change the permissions for all files, directories, and subdirectories. Note – The permission 755 is good to set for directories but not on files. This set the execute bit on files which is not recommended for any production environments excluded some specific cases.
In addition, CentOS can manage file and folder permissions types by group. You can change file or folder permissions on computers running CentOS using the CHMOD terminal command or by using the Nautilus file manager.
Rule of thumb:
assets/
, silverstripe-cache/
) need to be writable by the serverchmod 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With