I am using Plesk and read in the forum some similar issues but it seems no direct match to mine.

Simply put, I just wanted to install the core component first, and I got this error:
The selected file /var/www/vhosts/example.com/httpdocs/files/tmp/xxxxx could not be copied. I ignored it and then I believe xmlsitemap is not working at all.

I tried to play with owner, group permissions, but no luck. Can anyone shred some lights on this? I believe this should be common for some hosting Drupal sites.

Alternatively, is there any other sitemap tool that can generate URL from drupal url alias?

Thanks,

Comments

Paintbox’s picture

Priority: Normal » Critical

I have the exact same error, on a shared hoster. I've tried to come up with all available permission/server settings, but no luck. (Including resetting server ownership of the directories)

What are the *preconditions* and *dependencies* of this module? A list that could be checked?

Apparently is a module that tries to copy, and alter certain files.

So please, any help, info etc, are much appreciated.

*If certain installation steps could be done manually, that info would be great as well*

Paintbox’s picture

Priority: Critical » Normal

I already created my own sitemap app. So take your time to reply to this thread ;)

Seriously, I hope more info is given and the issue can be resolved. Thanks!

gorilla_ch’s picture

I now have it running. Here is what I did:

During installation:
1. install the app, just ignore the error msg:"The selected file /var/www/vhosts/example.com/httpdocs/files/tmp/xxxxx could not be copied"
2. change the owner, group of xmlsitemap & tmp directories to the particular web user , and make the directories 777. I also added "apache" into the group my web user belongs to.

After installation:
Sometimes files inside xmlsitemap (don't know why) got changed to under my web user. the app on the other hand needs to override the files as "apache" when sitemaps need to be updated. of course it doesnt work (note no error msg was given). so what i did was to make all files under xmlsitemap to "apache", owner and group.

Sorry, I don't have time to drill down into the root causes yet.

Paintbox’s picture

That sounds like a cause for this behaviour, and it probably is something on the permission level then. XMLsitemap creates files which don't have the same permissions as the native 'apache' user.

darren oh’s picture

Status: Active » Postponed (maintainer needs more info)

XML Sitemap has no ability to change the ownership of files.

darren oh’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

The 5.x-2.x-dev version doesn't store site maps in files, so this is no longer an issue.

open-keywords’s picture

I wouldn't share this statement

Either you propose a stable version, and maintain it for critical bugs, either there is no stable version of this module and then people knows what to expect.

open-keywords’s picture

Version: 5.x-1.4 » 5.x-1.x-dev

I would suggest a solution:

I'm using a multi-site installation, and it happened that my filesystem settings where incorrect

I suggest that you look at http://yousite/admin/settings/file-system and verify the folder defined here
It should exist within your drupal installation folder (unfortunately no check is performed on this page)

@Darren Oh

I would suggest that you look at the check being done in the upload module, it would help people fix such trouble
http://api.drupal.org/api/file/modules/upload/upload.module/5/source

     // Make sure necessary directories for upload.module exist and are
      // writable before displaying the attachment form.
      $path = file_directory_path();
      $temp = file_directory_temp();
      // Note: pass by reference
      if (!file_check_directory($path, FILE_CREATE_DIRECTORY) || !file_check_directory($temp, FILE_CREATE_DIRECTORY)) {
        $form['attachments']['#description'] =  t('File attachments are disabled. The file directories have not been properly configured.');
        if (user_access('administer site configuration')) {
          $form['attachments']['#description'] .= ' '. t('Please visit the <a href="@admin-file-system">file system configuration page</a>.', array('@admin-file-system' => url('admin/settings/file-system')));
        }
        else {
          $form['attachments']['#description'] .= ' '. t('Please contact the site administrator.');
        }
      }

Regards

darren oh’s picture

open-keywords: It's stable, it works, and it's your responsibility to either learn how to use it or provide a patch. That's how free software works.

open-keywords’s picture

Version: 5.x-1.x-dev » 5.x-1.4

@Darren Oh: Claiming that the only solution is to go to an unstable version isn't appropriate. It gives the impression of very little care to your users.

Collaborative development of free software doesn't mean that users should face long lasting blocking bugs.

Many Drupal modules demonstrate a lot of care to their users by providing inline help messages and configuration checks. This is to key ensure the spread and success of free software. I don't see any reason to no adhere to this behavior.

Regards

mioan’s picture

Component: xmlsitemap » xmlsitemap.module

I solved this by giving permission "Write" to the "Other" user.
Maybe the xmlsitemap module has lost the user account under which it should run and it is now running as "other"?

Michael
http://www.24Hsoftware.com

bartezz’s picture

Don't know what has changed on my server but encountered this problem as well.
I didn't want to mess around with permissions so I tried renaming the xmlsitemap directory to xmlsitemap.bak.
Then edited and saved a node and the module created a new xmlsitemap directory.
Everything now works fine!

I couldn't delete xmlsitemap.bak thru FTP due to owner permissions of the files within the dir.
So I reset the ownership of the dir with Plesk and then deleted them. I reckon doing this might even solve the
problem without having to delete the dir :)

Cheers,
Bartezz

greg.harvey’s picture

I tried Bartezz's trick, but it didn't work. xmlsitemap re-created its directory and *still* couldn't copy the file. =(

See: #197104: XML Sitemap cannot update sitemaps, specifically: http://drupal.org/node/197104#comment-2149832

bartezz’s picture

Did you rest ownership for the directory INCLUDING contents via Plesk?

Cheers

greg.harvey’s picture

@Bartezz, no Plesk here, just a standard LAMP stack. Ownership is not so important, since *everyone* is set to rwx:

# chmod -R 777 /var/www/vhosts/mysite.co.uk/httpdocs/files
# chmod -R 777 /var/www/vhosts/mysite.co.uk/tmp

I did also try various chown combinations to no avail.

Anonymous’s picture

@greg.harvey:

  • What is your DocumentRoot?
  • Give us your active modules.
  • Did you really mean /var/www/vhosts/mysite.co.uk/tmp or iss it more like /var/www/vhosts/mysite.co.uk/httpdocs/tmp?
greg.harvey’s picture

@earnie: I really meant the path I gave there. DocumentRoot is /var/www/vhosts/mysite.co.uk/httpdocs. I'll get back to you on the modules. It's a D5 site, but there's nothing particularly weird, and all the other file handling modules (e.g. FileField, Upload, etc.) work fine.