0

I have just installed XML Sitemap on a EC2 drupal 8 instance. I am seeing the following error message in the admin report status page:

XML sitemap cache directory
Not found or not writable
The directory public://xmlsitemap was not found or is not writable by the server.
See http://drupal.org/node/34025 for more information.

The provided link is broken. I have done some reading and created a /xmlsitemap directory in /var/www/html (which is the root of my drupal installation). I chmod it to give rwx access to everyone (a+).

But, the issue remains. I cannot generate the cache files.

How can I solve this issue?

  • 1
    Shouldn't the public://xmlsitemap point to sites/default/files/xmlsitemap in this case or is this only true for drupal 7? – Cyclonecode Aug 7 '16 at 12:34
  • 1
    @Cyclone is correct, that is the default path for public:// – Berdir Aug 7 '16 at 12:37
  • 1
    You should also be able to check the path through running the following drush command from the root of your installation: drush vget file_public_path or running the following query against your database SELECT * FROM variable WHERE name = 'file_public_path' – Cyclonecode Aug 7 '16 at 12:39
  • I get a Command variable-get requires Drupal core version 6 or 7 to run. when running Drush. I am checking for the query solution. – Jérôme Verstrynge Aug 7 '16 at 12:51
  • Just to resolve the above issue, under drupal 8 you should instead be able to use drush config-get file_public_path to get the path to the public files folder. – Cyclonecode Aug 7 '16 at 13:06
0

I found the file_public_path value from the /admin/config/media/file-system page. It was set to sites/default/files, relative to the installation path.

I checked permissions and noticed some writting permissions were missing (the directory was already created). I sudo chmod a+w xmlsitemap/ and that solved the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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