During development of a magento 2 site I keep getting permission issues. When I move from modes I get "
Cannot change permissions for path." Is there something else that I should be doing?
The M2 setup requires a specific user, not www-data, to be magento system owner. Running any bin/magento command as root will create files and folders as root, which may cause issues. See: http://devdocs.magento.com/guides/v2.0/install-gde/prereq/file-system-perms.html
We have a deployment in which we use the following command for example
su magento_user -s /bin/bash -c "bin/magento setup:upgrade"
to run the scripts as a specific user