What should be file permissions in Magento 2 after deploying website to live and website is in production mode.
I have read many forums and found that the file permissions of folders generated,var and pub should be 777 but in Magento 2 documentations it is different.This create a little bit confusion so please let me know if anyone have idea about this.
When you are ready to deploy your site to production, you should remove write access from files in the following directories for improved security:
Any other static resources
We are getting issue that permissions changed automatically to root and website stopped to work.We are not able to run the Magento command without sudo.
Currently we are having ubuntu user and www-data group.
Please share your thoughts how to run Magento command without using sudo in details.We are using AWS server.
I have followed answer of this question but still permission are changed for cache and page_cache folder.It is still creating with user www-data.