Showing results for 
Search instead for 
Did you mean: 

Resource files inaccessible on shared hosting environment

Resource files inaccessible on shared hosting environment

After installing Magento 2.0.2 on a shared host server, significant  portions of the site are broken due to restrictive file permissions (0660) that are apparently set with the intention that the Apache account will be a separate account under the control of the filesystem owner. On a shared system this is usually not the case - PHP runs as the account owner, Apache runs as a low-level account (e.g. nobody) and the owner has no control of group memberships.


As a result, css, js, and images in pub/static/ are all inaccessible to Apache. Even manually changing the file permissions only solves the problem temporarily, as generated files are created with the same restrictive permissions.


A Github issue thread at referenced this problem way back in November, as do numerous other forums online, where users have contributed all sorts of alternate permission configuration suggestions, but no-one seems to have offered a supported permanent solution or even a viable workaround for users trying to run Magento 2.0 on a shared server environment. 


Can anyone provide some advice on how to run Magento 2.0 securely on a shared hosting environment?