How to setup Magento 2 File Permissions correctly

Estimated reading time: 1 min

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: 5
Rate us
1 Star2 Stars3 Stars4 Stars5 Stars (7 votes, average: 4.85 out of 5)