Drupal 'Access Denied' on allĀ pages
by Sean McKeon, Web Developer
Ran into an interesting little snag this morning - a client's Drupal site was spitting out "Access Denied" errors for all page loads by anonymous users. It didn't appear to be a permissions problem - the nodes just wouldn't let anyone look at them.
A bit of Googling found a bunch of posts like this that say that, for some mysterious reason, Drupal can lose the contents of the node_access table and you need to repopulate them.
INSERT INTO node_access (nid ,gid ,realm ,grant_view, grant_update , grant_delete) VALUES ( '0', '0', 'all', '1', '0', '0')
Unfortunately, I didn't exactly have access to the client's database. A bit of poking around in the source showed me that visiting /admin/content/node-settings/rebuild would fire off an internal process to do the same thing.
Crisis averted, fix discovered. I just hope I don't need to use it again in the future.
Comments
Thanks for this! After
Posted by JBB on . [Reply]
Thanks for this! After unsuccessfully trying multiple other fixes, this was the one that saved our site!
Much appreciated.
Awesome! Thank you. Yet
Posted by Anonymous on . [Reply]
Awesome! Thank you. Yet another entry into my massive little Drupal quirks file. I really start to wonder at times how much time I'm saving with Drupal when you take into account the hours scouring the interweb to try and find solutions to its... features. Yawn.
Many thanks. It solved time
Posted by vmu on . [Reply]
Many thanks. It solved time of frustration.
Thank you Dude...! I am just
Posted by zeno on . [Reply]
Thank you Dude...! I am just angry I didn't find you 6hours earlier....I lost that hours, but finally I google you and fixed it in 2minutes.... You are a MAN ! Zeno
Thank you!
Posted by VladRM on . [Reply]
Thank you!
Thank you so much this made
Posted by webalchemist on . [Reply]
Thank you so much this made my day! Worked great for me in 30 seconds or less! Drupal 5.21
Webalchemist
Conscious Web Solutions
http://www.consciouswebsolutions.com
Simply perfect! God bless you
Posted by Rafael on . [Reply]
Simply perfect!
God bless you my friend!
Thank you.
Thanks. We've been wrestling
Posted by Zak Greant on . [Reply]
Thanks. We've been wrestling with intermittent permissions issues for a few weeks now (and rebuilding permissions would lead to all anonymous users being denied access to all pages). This fixed it. I hope it sticks. :)
hey you just saved me from a
Posted by shekhar on . [Reply]
hey you just saved me from a loss. Today morning i ran into similar problem. Thank god your solution was there to save me. You are just an angel to me.
Thank you thank you thank
Posted by Nancy on . [Reply]
Thank you thank you thank you....I nearly cried before I found this post.
Thank you so much, I think I
Posted by Elhu on . [Reply]
Thank you so much, I think I just fell in love with you xD!
Worked Like a Charm
Posted by Larry on . [Reply]
I implemented your solution by visiting /admin/content/node-settings/rebuild as you suggested. The result, which took about five seconds, repopulated the contents of the node_access table.
Thank you, thank you, thank
Posted by Tim on . [Reply]
Thank you, thank you, thank you, thank you, thank you..... You get the point.
Thanks
Posted by JJ on . [Reply]
Thank you for solution. Helped ALOT. Now I can soon go to sleep :]
Thank you so much, this
Posted by guillaume on . [Reply]
Thank you so much, this solved my problem.
If you had a paypal donation button, I would have paid you a beer.
Thanks mate
thanx for this post, you
Posted by dave on . [Reply]
thanx for this post, you saved my life, btw for me it happend when the quota of database was exeeded
Many thanks!
Posted by Ryan Bayona on . [Reply]
I did this after pulling my hair out for several ! Thanks a lot!
Thank you SO much for posting
Posted by Chris Smith on . [Reply]
Thank you SO much for posting this solution..... you saved our skin! So happy now. :)
Thanks a bunch!
Posted by Ben W on . [Reply]
I ran into this exact issue and got everything working again thanks to your assistance!
Success!
Posted by John on . [Reply]
Thx! Saved the day!
Perfect !
Posted by mattheoh on . [Reply]
Was searching for a day... I lost my contents after using cache....
Didn't see thois ioption in the back office.
your tips solved everything.
just a word, thanks a lot.
Add new comment