Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

hasans's avatar
Level 21

Laravel generated files (storage/framework/views) are with wrong permissions.

Laravel generates files in folder storage/framework/views/* with different permissions (744) then the parent folder storage/framework/views (755).

This creates a problem when I deploy project and clear the views cache files with a user (admin) who is in the group, but is not the owner(www-data) of the files.

For security reasons user (admin) does not have sudo rights and I cannot deploy with user www-data.

How to solve this?

0 likes
1 reply
arukomp's avatar

give your user ACL rights to access the whatever folder you need:

acl -R -m u:admin:rw laravel/storage/framework/views <- recursively give read/write access to the current files

acl -R -d -m u:admin:rw laravel/storage/framework/views <- recursively give default read/write access to files created in the future.

there's a chance you might not have ACL installed, so just yum install acl or apt-get install acl

Please or to participate in this conversation.