How to setup Magento 2 File Permissions correctly

Example on Ubuntu


  • Apache is run as user www-data and group www-data.
  • Magento root folder is /var/www/magento2
  • User name – magedev

In this example, we will use server with apache2

1. Log into server as the root user

2. Create new user which will own files and will be added to server (for example Apache or Nginx) group

3. Add user to www-data group

4.Setup correct permissions

5. Work as magedev user with Magento on server
Install Magento File Permissions correctly and easily!


Was this article helpful?
Dislike 0
Views: 260
Valentyn Kubrak

Valentyn KubrakChief Operating Officer

Rate us
Please wait...