Closed (fixed)
Project:
XML sitemap
Version:
6.x-2.x-dev
Component:
xmlsitemap.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Dec 2009 at 06:40 UTC
Updated:
2 Feb 2010 at 21:40 UTC
Hi all,
With fresh install of XMLSitemap module, it can't generate XMLSitemap data.
I have this error :
warning: fopen(sites/default/files/xmlsitemap/xmlsitemap-fr-0.xml)
[function.fopen]: failed to open stream: No such file or directory in /home/drupal/sites/all/modules/xmlsitemap/xmlsitemap.inc on line 192.
user notice: Could not open file sites/default/files/xmlsitemap/xmlsitemap-fr-0.xml for writing. in /home/drupal/sites/all/modules/xmlsitemap/xmlsitemap.inc on line 193.
I have created these 2 files manually and after that it works.
It's not a problem with access rights. Drupal have full access on directory "sites/default/files/xmlsitemap/"
Regards
Comments
Comment #1
dave reidDo you have any error messages on your status report (admin/reports/status)? Are you sure the web server user has write permissions on the sites/default/files and sites/default/files/xmlsitemap folders? There must be some configuration going wrong here. You're the first user of 6.x-2.x to report this problem.
Comment #2
srobert72 commentedYes Drupal (Apache server) has full access to these directories.
When are these files created ?
During installation of module ? Or during generation of XML Sitemap file ?
Maybe I had access problem during installation, but not now it's sure.
Comment #3
dave reidThe directory should be set up on install, files inside the directory are created during generation of the XML sitemaps.
Comment #4
srobert72 commentedSo if we delete files in sites/default/files/xmlsitemap they should be recreated again during last generation ?
In my case this test doesn't work, they are not recreated.
Extract of rights before I deleted them :
ls -al sites/default/files/xmlsitemap
total 16
drwxrwxr-x 2 www-data www-data 4096 2009-12-29 19:19 .
drwxr-x--- 11 www-data www-data 4096 2009-12-29 19:19 ..
-rw-r--r-- 1 www-data www-data 1866 2009-12-29 19:19 xmlsitemap-en-0.xml
-rw-r--r-- 1 www-data www-data 1892 2009-12-29 19:19 xmlsitemap-fr-0.xml
Comment #5
dave reidMake sure your Minimum sitemap lifetime is set to 'No minimum' at admin/settings/xmlsitemap temporarily to help debug this. The files should be created whenever the sitemaps are generated then.
Can you also double check for any xmlsitemap error messages in admin/reports/dblog?
Comment #6
srobert72 commentedI didn't change "Minimum sitemap lifetime" which is still setted as default "No minimum".
I deleted xmlsitemap.xml files to test again. Here are errors :
In Admin Console :
and under this
In DbLog :
ls -al /home/drupal/sites/default/files/xmlsitemap
www-data is Linux user who runs Apache.
Shoul I set write access to All users ? Why ?
With same access to all directories, FileField as no problem to write uploaded files.
Comment #7
dave reidMight as well try different permissions on that folder. Might want to try using 775 or rwx-rwx-r-x.
Comment #8
srobert72 commentedWhy FileField upload (for example) can write files without any problem ?
I used chmod 750 as recommended for security reason (I don't remeber where I found that information).
Quick search gives me that :
http://drupal.org/node/244924
Comment #9
dave reidThat pages shows 770 in its examples, it's worth trying temporarily.
Comment #10
asd123asd5 commentedactually I have the same problem. for me the file is created under apache:apache instead my usual ownership, even if you chown it, the folder gets deleted and recreated everytime you rebuild.
Comment #11
dave reidOk I found a bug that was deleting the root files/xmlsitemap folder every generation, and changed it to only delete the files in the directory. Please give the latest 6.x-2.x code a try sometime tomorrow after it get repackaged.
Comment #12
asd123asd5 commentedHi Dave,
Latest of 6.x-2.x is working perfectly for me. Thank-you!
Comment #13
dave reidGreat to hear. We're actually testing it on a test site for deployment on drupal.org yesterday and encountered the same problem. With the new code it resolved itself. Sorry everyone! :/
Comment #14
srobert72 commentedLatest 6.x-2.x-dev (2010-Jan-18) is working for me too.
Thank you Dave.
Comment #15
dave reid@srobert72: Thanks for the report back here too. Yay!
Comment #16
grahamshepherd commentedThis worked for me too. Thank you Dave.