Magento – Magento 2.1 pub/static permission

magento-2.1magento2permissions

i have some trouble when i run command php bin\magento setup:static-content:deploy

it always keep missing permission when create new folder even after i assign full permission (i'm using windows) and tick 'apply to subfolder and files', this permission is not inherited in new folder

is this some bug on magento and is there any way to fix this?

PS: my magento is on dev server which is running CentOs and my local computer is running windows 7

Best Answer

Magento 2 recommended folder and file permission

Please follow following terminal commands for folder and file permission.

find . -type f -exec chmod 644 {} \;

find . -type d -exec chmod 755 {} \;

find var pub/static pub/media  generated/ app/etc -type f -exec chmod g+w {} \;

find var pub/static pub/media generated/ app/etc -type d -exec chmod g+ws {} \;

chmod u+x bin/magento
Related Topic