6

I'm having issues trying to run the Readiness check on Magento 2.1 It's saying "Found non-writable path(s)" with a massive list of paths what aren't writable.

The thing is, they are writable, I've changed the Owner/Group to so many things and nothing has worked, tried reindexing, clearing cache and generation in /var/

6 Answers 6

6

If you deleted samples files, you may have an error such as :

update-cron.ERROR: Cron readiness check failure! Found non-writable paths:  
/magento2/.htaccess.sample  
/magento2/.php_cs   
/magento2/.travis.yml   
/magento2/.user.ini     
/magento2/CHANGELOG.md  
/magento2/CONTRIBUTING.md   
/magento2/COPYING.txt   
/magento2/Gruntfile.js.sample   
/magento2/ISSUE_TEMPLATE.md     
/magento2/LICENSE.txt   
/magento2/LICENSE_AFL.txt   
/magento2/nginx.conf.sample     
/magento2/package.json.sample   
/magento2/php.ini.sample    
/magento2/pub/.user.ini [] []

it seems that they are necessary in order to not find a massive update.log file due to cron checks...

1
  • same here with Magento CE 2.1.9. Just created the missing file in the root folder (only ISSUE_TEMPLATE.md in my case)
    – cap340
    Commented Feb 8, 2018 at 21:01
2

This was happening with me, too. I ended up specifically outlining those directories in the CLI (the directories giving me issues were inside var/cache and var/generation) via chmod.

But what did it for me was LOGGING OUT, flushing cache upon login, and THEN re-running the test.

find var vendor pub/static pub/media app/etc var/cache var/generation -type d -exec chmod u+w {} \;

find var vendor pub/static pub/media app/etc var/cache var/generation -type f -exec chmod u+w {} \;

chmod u+x bin/magento

Hope this helps.

1
  • Thanks for the trick: going back to administration board, log out (or clear cookies in web browser) php bin/magento cache:flush ; log in administration ; go to web wizard ; try again. Commented May 29, 2018 at 15:31
2

I had a simple fix for my Readiness check fail. Normally this happens due to issue with owner of the the file /folder where it says "non-writable"

Issue was, Readiness check fails and says. Cron check fails non writable path found /bitnami/apps/magento/htdocs/var/.htaccess

my fix on Magneto 2.3 was .htaccess no found in the folder. So create vi /opt/bitnami/apps/magento/htdocs/var/.htaccess

sudo chown -R bitnami:daemon /opt/bitnami/apps/magento/htdocs/var/.htaccess

now all good for upgrade.

0

Make sure, access rights are set for the right user/group. Which user/groups is the right one depends on you server setup.

Magento describes two different setups here: http://devdocs.magento.com/guides/v2.0/install-gde/prereq/file-system-perms.html

The most important part is:

1) What user is running the setup

2) What user is running the webserver (that in the end handles the http-requests that trigger the magento software)

Well configured servers usually make sure that you don't need to worry about this. But sometimes you can get pretty ugly setups, where access rights need to be set for several users and groups in order to make magento work.

In most cases it is enough to make sure that the webserver´s user has access rights to the appropriate directories.

A simple way to find the apache (webserver) user is by running ps aux | grep apache in the shell of your server.

More sophisticated answers to finding the apache user can be found here: https://serverfault.com/questions/125865/finding-out-what-user-apache-is-running-as

Summary

Make sure what user is running your webserver

Add write privileges to the magento directories to that user

2
  • That's the thing, all the "non-writable paths" are all writable by www-data (the apache user)
    – ohpls
    Commented Aug 26, 2016 at 13:21
  • Are you using the web interface set up? Or are you doing the set up via the console?
    – Jérôme
    Commented Aug 31, 2016 at 13:52
0

Use this permission for Magento 2 production mode

find app/code var/view_preprocessed vendor pub/static app/etc generated/code generated/metadata \( -type f -or -type d \) -exec chmod u-w {} + && chmod o-rwx app/etc/env.php
chmod u+x bin/magento
chmod -R 777 generated/ var/view_preprocessed/ pub/static
chmod 644 app/etc/NonComposerComponentRegistration.php app/etc/db_schema.xml app/etc/di.xml app/etc/registration_globlist.php vendor/.htaccess
0

I my case .htaccess file was missing on the following locations : /var/www/vhosts/redcarpetbeauty.co.uk/htdocs/pub/static/.htaccess /var/www/vhosts/redcarpetbeauty.co.uk/htdocs/var/.htaccess [] []

What I did is, I copied & paste root .htaccess file in the respective folders and applied permissions after that my error gets resolved.

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.