Categories
Security

How to Harden File permission for Laravel ?

Apache User

chown -R apache:apache .

Files

find . -type f -print0 | xargs -0 chmod 0400

Directory

find . -type d -print0 | xargs -0 chmod 0500

writable for storage and cache folder

chmod -R 700 storage/
chmod -R ug+rwx storage bootstrap/cache/

Leave a Reply