Why do I get 'access denied' when viewing nodes? I'm testing my website and I have to cope with a strange problem. Although every role has the permission "View published content", only the administrator can access nodes: anonymous users and authenticated users can't. The same problem occurs with adding content. I've tried clearing caches, saving the permissions again and rebuilding the permissions, but nothing helps. I'm not using any modules that control node access either...

How can I solve this?
Things to try when you get inexplicable "Access denied" when non-admins try to view nodes and you're sure every role has the permission "View published content":


Clear all caches. Note that you need to both clear your browser's cache and the Drupal cache on the server. To clear your browser's cache, hold down Shift and reload the page. To clear the server cache, navigate to Administration → Configuration → Development → Performance → Clear all caches. If you use Views, clear Views' cache: Administration → Structure → Views → Settings Advanced → Clear Views' cache. If you've got drush installed (always a good thing to have around), a quick way to clean all caches on the server is drush cc all.
Rebuild permissions: append the path: admin/reports/status/rebuild to your site's base URL, or navigate to Administration → Reports → Status report and look for the link "Rebuild permissions".
Repair the Sessions table: Use phpMyAdmin or a similar tool, choose your Drupal database, check the box next to the {sessions} table, and find the "With selected" drop-down near the bottom of the page. Choose "Repair table".&nbsp;
If you've just installed a new module, make sure that you've executed a database update. To execute a database update, append the path update.php to you site's base URL.  (There will be a link to this page on the Status reports page if Drupal thinks you need to do it.)
Use the DNA module (part of Devel) to debug node access problems. DNA will display a block telling you exactly what permissions are enforced and where they come from.  Remember to give give the anonymous and authenticated user roles permission to "Access developer information" to use DNA to debug access problems for these roles. Report your findings here by editing your question if you don't understand the output of DNA.
If none of the above works, start disabling modules to see if one of those causes the problem.  Remember to clear caches after disabling a module.  You may also want to rebuild permissions (see pt. 2 above) after disabling a module, even if the module don't tell you to do it.