In reference to this guide:


I have followed the guide to install Magento2 into a RHEL 7.2 server word-for-word, however, have not managed to get past the permissions check within the setup wizard.

As per the screenshot below, the permissions as far as I can see, are set correctly and the directories are writable by the Apache user, however, the check just fails.

I have run a further test by temporarily changing the permissions on one folder to 777, however, this also has no effect and still shows up as failed, so I can't help thinking there's something I've missed. I've spent 2-3 hours on this already so have finally given up.

Please see the below screenshot as a reference to my setup:

Permissions issue

  • The problem I see is ownership, not permissions. In your system, everything is owned by apache:apache but ownership should be <magento file system owner>:apache. Start here for information. Commented Sep 13, 2016 at 18:01
  • OK, thanks. I've changed this now so that the user 'magento' which is a member of the 'apache' group is the owner, however I'm still getting this error. Any other ideas would be appreciated!
    – StrattonL
    Commented Sep 20, 2016 at 18:00
  • Did you run the command as a user with root privileges? Did the command return any errors? Commented Sep 22, 2016 at 12:45

1 Answer 1


Magento 2 Need to set Right Directorys and files permission

Directory 775

 <magento root directory>$ find -type d -exec chmod 775 {} \;

File 664

 <magento root directory>$  find -type f -exec chmod 664 {} \;

Owner Permission to Webserver


 chown -R apache:apache /var/www/html/


 chown -R www-data:www-data /var/www/html/

Reference: http://devdocs.magento.com/guides/v2.1/install-gde/prereq/file-sys-perms-over.html

  • As shown in the screenshot, the permissions are set to rwxrwxr-x which equates to 775 for the first command.
    – StrattonL
    Commented Sep 14, 2016 at 21:16
  • yes , rwxrwxr-x equals to 775 for reference linuxcommand.org/lts0070.php Commented Sep 15, 2016 at 4:14
  • This isn't correct for Magento versions 2.0.6 and later. Instead, try the following command from the Magento root directory: cd /var/www/html/magento2 && sudo find var vendor pub/static pub/media app/etc -type f -exec chmod g+w {} \; && sudo find var vendor pub/static pub/media app/etc -type d -exec chmod g+ws {} \; && sudo chown -R :apache . && sudo chmod u+x bin/magento Commented Sep 22, 2016 at 12:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.