magento file permissions

Install sample data in Mage after installation – Permissions – Part 04

Finally we’ve reached the ultimate step to complete the Magento Sample data installation process. Here we need to setup ownership & permissions for completing the setup. Hence remember, regardless on type of process whether Clone SSH or Clone https, we need to setup Magento file permissions using the same procedure.

Being a good host, we’re responsible to guide you and provide technical support to our clients. So buy our Mage cloud hosting plan to enjoy tech support round the year for issues, for example setting Mage permissions. Also we’re providing some of the best cloud hosting with premium services like CDN, SSD storage for faster response & guarantee 99.99% up time. So, join our Mage Basic cloud hosting plan to give us try for $9.99 per month. 

Tanzia Farin Chy for Aspiration Hosting

Ownership and Magento File permissions

However remember, it is a must do to setup Magento file permissions and ownership in the sample data repository. Because our Mage 2 repository and Sample data repository are symlinked. Actually the script php build-sample-data.php script is reason behind the symlinks between earlier mention repositories. So, in case of any failed occurrence might result errors to access the storefront.

Now we’ll setup Magento File permissions and ownership for the Sample data repository using following steps:

  • First we’ll need to go into our sample data clone directory.
  • Secondly we’ll now set the ownership using following command-line:

chown -R :<your web server group name> .

For example if we’re using CentOS use the following command-line:

CentOS: chown -R :apache

On the other hand Ubuntu users may use the following command:

Ubuntu: chown -R :www-data

  • Thirdly we’ll setup the Magento File permissions. Here use the following command:

find . -type d -exec chmod g+ws {} \;

  • Final step is to clear the static files using following command-line:
cd <your Magento Open Source install dir>/var

rm -rf cache/* page_cache/* generation/*

Concluding the Mage sample data installation process

So, right after the download ends for Sample data packages, log in to Mage server. Either we can also switch, as a Mage file system admin. Now use the following command-line to upgrade and finalize the setup:

php <your Magento install dir>/bin/magento setup:upgrade

Now reading Part 04 | Part 01 | Part 02 | Part 03