- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Error generating Sitemap
Hello, when I try to generate a sitemap at magento 2, it shows me this error:
Please make sure that "/" is writable by the web-server.
If anyone can help me with this, it would be awesome, thanks.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Error generating Sitemap
Hi @ianfe24,
Probably your files owner is not the same than the user than runs the webserver.
For that reason you webserver can't write the file. Can you check that?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Error generating Sitemap
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Error generating Sitemap
Hi, but maybe the group has only read access?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Error generating Sitemap
create one folder inside magento directory and set 777 permission.
In sitemap give path value /test/ and save it.
Where test is my directory name.
Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Error generating Sitemap
Hi @ianfe24, @Sunil Patel,
Please try to avoid the 777 permission. It will be a security risk.
Try to set the owner of those files/directories with the same user than the one is executing the webserver process.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Error generating Sitemap
I know, so i said to create folder and assign it.
Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Error generating Sitemap [SOLVED]
I my case, Magento 2.4 CE (Ubuntu 18.4, Apache), the solution was to have the containing directory group and owner as www-data. Prior to that it was owner: magento and group: www-data.
This change is required because HTTP login to Magento admin is via Apache2 with user and group being www-data.
All of the files and directories in the containing directory remain as, owner: magento and group: www-data.
EG: /var/www/html/mydomain.com/magento/
The sitemap file is now written successfully with owner and group of www-data.
Good luck.