I have just switched over a site live and I'm having problems regenerating the XML sitemap.

When I try, I get:

You are not authorized to access this page.

The URL is: www.example.com/batch?op=start&id=207

What could be causing this?


EDIT: I have created a new role with every single permission and assigned the user I'm logged in with to this role. Still no luck1

closed as too broad by kiamlaluno Aug 9 at 12:12

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    btw, you can also generate xmlsitemap via drush (given that you have access to shell and drush), I prefer that. – Dipen Jun 7 '12 at 10:53
  • I don't have shell access or Drush – terrid25 Jun 7 '12 at 11:20
  • Does anyone know why I'm getting permission denied? – terrid25 Jun 7 '12 at 15:01

Had to manually run the cron via the browser to generate.


Your issue might be related to a small value in max_allowed_packet parameter in your MySql configuration. Drupal cannot store correctly the batch operation data and the subsequent execution fails with a "permission denied" error.

There's an issue here, discussing the problem.

If you cannot edit your MySql configuration (like me), there's a patch at message #41 that helped me bypass that issue. It's a couple of lines that you can modify by hand.


I struggled with a similar issue and eventually realized that I had created a folder named batch in my Drupal root, which interfered with the resolution of the "/batch/" path in the request. Generally speaking, I have found that menu router entries that match actual folder names in your Drupal install seem to cause odd behavior...best to avoid that.

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