Last updated 23 February 2013. Created on 26 August 2008.
Edited by LeeHunter, bekasu, alphageekboy, petiar. Log in to edit this page.

If you can not rebuild your content permissions (rebuild does not finish or finishes with error) after installing Organic Groups (OG) access control module (part of the OG bundle) do this:

1. Run this command on your sql server:
delete from node_access;
insert into node_access values (0,0,'all',1,0,0);

2. Turn off the OG access control module

The module will be disabled but node permissions are will work and the site is not corrupted.


Update: May 29, 2009 by AlphaGeekBoy

In researching this issue and digging deeper, I found that I had two left-over content items from a content type that I had previously deleted. This was preventing the content permissions rebuild from rebuilding. Once, I removed those two nodes from the node and node_revisions table, I was able to leave OG Access control turned on and run rebuild permissions with no problem.


Content without a title can also cause this. Construct a view to check all your content for missing UID (UID=0), missing title, or missing type. There may be other things that can cause this, but those will definitely do it.

Looking for support? Visit the forums, or join #drupal-support in IRC.


savinsur’s picture


The command worked to fix my site, but it still shows the warning:

"The content access permissions need to be rebuilt. Please visit this page."

So after the fix, I re-run the rebuild and the site goes back to wonky. Rebuild fails, anonymous users
can't see anything and the error still persists. I have checked legacy content but have none.

What to do now?

savinsur’s picture


After confab with server dude:

ModSecurity: Access denied with code 501 (phase 2).
[id "960010"]
[uri "/batch"]

create a rule that lets /batch around id 960010