Hire Magento 2 developers (up to 5 years exp, Magento 2 experience since beta release) Contact us now!

Featured

How to set up the right permissions and ownership for Magento 2

magento2-file-system-ownership-and-permissions

Often after installation of new modules in Magento 2 or simply in the process of development users face privileges and ownership issues. In order to avoid this kind of problems – we have a great solution.

In order to create the script for fixing those issues you should do the following:

Step 1. Create a shell script file

Step 2. Edit the shell script nano /data/www/html/your_mage_dir_name/permissions_fix.sh
and copy the code.

The shell script code below can be used to reset and correct the ownership and permissions of the Magento 2:

Finally to run the script – you need to execute the following commands:

Hope this script will help you to simplify the workflow with your Magento 2 stores development and deploy processes 😉

Pavlo Okhrem
Article by Pavlo Okhrem

CEO/Co-founder at eLogic Commerce. E-commerce expert. International conferences speaker.