Ran across this one today. Upgrading a site with some custom work from 4.7 to 5.6. Obviously the testing of the upgrade is going on is a development environment but we ran into a problem with anonymous users being denied access.
Well, a quick check of the access control records proved that anonymous users did in fact have the Access Content permission. Hmmmm…. what else could it be.
As a side note, originally on pages where the user was denied access all you got in the content body was a “2″. No access denied message, just the numeral “2″. Thanks to the good folks on irc #drupal-support it was found this this is typical of an access denied issue. Atleast that led us down the right path.
Long story short, the tac_lite module had been previously installed on this site but was no longer being used. Apparently the disabling of the module did not properly clean up the node access data.
Again, thanks to the great folks on #irc, this time BDragon, and a quick search on drupal.org, the solution was easy. The default access row was missing. Adding the following to the table resolved the issue:
INSERT INTO node_access VALUES (0, 0, 'all', 1, 0, 0);
Yeah Drupal community! Yet another great reason to love Drupal.
Popularity: 67% [?]
You just saved me from going freaking crazy!!!
Haha…Excellent. Glad it helped at least one person. Now, that post was worth it.
Blessings
Thanks
I was dealing with this for a couple weeks after I tried out some permission based modules. It was driving me bonkers! Thanks for the tip
Thank you! Thank you! Thank you! This saved me a lot of time.
I am using views.
When creating a VIEW in the ACCESS part of VIEW i set it to access a role called STUDENT
But when i login as a STUDENT – it says access denied – you are not authorised to view this page – when i try to goto to the view pagelink
But when i goto Home » Administer » User management >> Access Control
and under “views module >> access all views” if i check it ON for STUDENT then i can see the page
Obviously i do not want the user STUDENT to see all the pages, except for teacher notes specific to them.
Funny part is i did not get this error yesterday.
So something i have done today – can you help me! (can’t figure out what has changes – except for that iinstalled two new modules nodefamily & view_fusion
ratnesh
Make that two happy persons!! Well done putting this down for us. Thank you!!
Another option perhaps….
1. Navigate to admin/build/modules/uninstall (administer – site building
- modules, click the “uninstall” tab) — check to see if there are any
disabled modules with uninstall features, esp any modules related to
access control. If so, uninstall them.
2. Then, navigate to admin/content/node-settings (administer – content
management – post settings ) and look for the “Rebuild Permissions”
button. Click it, and rebuild your permissions.
yes thanks …Excellent. Glad it helped.
Got the same problem switching from drupal 5 to 6, probably due to the nodeaccess module. And your solution worked perfectly!
Thank you, thank you very much!
Yay! It worked for me!
Thanks a lot!
Oh, well. It didn’t work exactly as you said. I had to remove this record first, then created it once again, just as you said.
BTW, the solution offered by DruplBuff didn’t seem to work.
You saved another soul with this post. I feared I would have to reinstall. Thanks!
Thanks for letting me know Thomas. I appreciate you taking the time to say so. Sometimes I wonder if anything I write is of any benefit to anyone other than myself.
Blessings
No, yet another reason to avoid Drupal like the plague. I tried this “solution” – it did nothing.
Lovely! Thank you!