
Based on the Magento 2 Developer Documentation the following are the requirements for File & Folder permissions
- 775 for directories, which means full control by the user, full control by the group, and enables everyone to traverse the directory. These permissions are typically required by shared hosting providers.
- 664 for files, which means writable by the user, writable by the group, and read-only for everyone else.
To set the proper file and folder permissions log into your website hosting via SSH and run the following commands:
1) Navigate to your store root
cd <your Magento 2 root dir>
2) Set the proper permissions for all files
find . -type f -exec chmod 664 {} \;3) Set proper permissions for all folders
find . -type d -exec chmod 755 {} \;4) Set proper permissions for the var, static and media folders
find var pub/static pub/media app/etc -type f -exec chmod g+w {} \;
find var pub/static pub/media app/etc -type d -exec chmod g+ws {} \;
5) The last step is to ensure that after your changes that the installation is still executable for the current user
chmod u+x bin/magento
Advertisement




