.How do I set file/folder permissions for Shopware 6 safely (no 777)?
Quick Answer
Never use 777 permissions on a Shopware 6 store. Use 755 for folders and 644 for files, then make only writable directories owned by the web server user. This keeps uploads, cache, and logs writable without exposing the entire store to security risks.
Set folder permissions
Run find . -type d -exec chmod 755 {} \; from your
Shopware root directory. This allows the server to access folders while blocking unsafe public write access.
Set file permissions
Run find . -type f -exec chmod 644 {} \;. This keeps
files readable by the server without allowing public modification.
Assign correct ownership
Set the web server user as owner for writable directories like
var, public/media, and public/thumbnail. On Ubuntu, this is usually
www-data.
Related Answers
Still need help?
Talk to our Shopware experts
We've handled GDPR/CCPA compliance for dozens of EU & US Shopware stores.