My permissions in Magento2.1 seem to be really messed up and I cant find an easy way to set them correct..

Currently the "www-data" user is owner of the "magento2 root folder". I have a second user "n1njawtf" which I need to connect to the ftp and change css files and such. Currently I always need to change owner of "magento2 root folder" to "n1njawtf", before I can edit the css files and such. After that I need to change owner back to "www-data" so its possible to view the store in browser...

Can anyone help me fix these permissions?

1 Answer 1


Add user n1njawtf to group www-data (see: https://superuser.com/questions/95972/how-do-i-add-a-user-to-multiple-groups-in-ubuntu). In the case, you can edit files.

Also you can change umask to 000, to allow edit files by any user (but it not recommended for public servers). See: http://devdocs.magento.com/guides/v2.0/install-gde/install/post-install-umask.html

  • The user n1njawtf' is already a member of www-data'. But I still cant edit files with the user n1njawtf.. Permission on root magento folder is currently " drwxr-xr-x 12 www-data www-data 4096 Dec 4 12:16 store.com"
    – N1njaWTF
    Dec 4, 2016 at 12:43
  • Looks like there no write permission for a group. Can you try run chmod -R g+w $magento_root
    – KAndy
    Dec 4, 2016 at 20:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.