Magento 2 Permission for Files and Directories

In Magento 2 permission is very important. Some features ( or whole website ) won’t work properly if you don’t set the permission correctly. So what are the correct file and folder permissions for Magento 2 and How to set Magento 2 file/folder permissions? Let’s find out

Magento recommend setting the permissions of file/folder in Magento 2 as below:

  • 755 for directories: User has a full control and Group/World can traverse directories;
  • 644 for files: User – read, write; Group/ World – read.

 

It’s clear but how to set the permission like that? We can set them using following commands ( via SSH )

You may need to clear Magento cache then, using command

That’s all we need to do to set correct permission for files and directories in Magento 2

If you have any question, just leave us a message.

Leave a Reply

Your email address will not be published.