JuliaKM.com

Drupal Permissions Issues: A Debugging Checklist

January 12, 2008

Every once in awhile, when working on a Drupal site, my content either disappears or I cannot log-in. At this point, I usually get rather angry and start thinking of worse case scenarios. What if I can never log into my site again? What if anonymous users can't read articles?

In a rare moment of clarity, I put together the following Drupal permissions debugging checklist. I hope that you find it as useful as I have.

1. Check user access control and make sure that all users can "access content"
Path: mysite.com/admin/user/access
Often, when installing a module, I accidentally change key permissions. For example, a couple of times I have allowed anonymous users to "access content" but not logged-in ones. Although my access control permissions are usually not the problem, its always best to check them before moving onto the next approaches.

2. Check input filter roles
Path: mysite.com/admin/settings/filters
One problem with having a lot of input filters is that you can easily mess up the permissions of a particular filter. If a user does not have permission to use an input filter, then they cannot edit content that can only be edited with that input filter. To give a real-world example, say that I set up a new input filter called "tinyMCE." Next, I set up my permissions for tinyMCE so that only my webmaster role can use the tinyMCE input filter. While doing this, I also set permissions so that only the webmaster can use my "Filtered HTML" and "Full HTML" input filters. Next, I set up a new role called "intern" and let the intern edit content. However, my intern reports that he cannot access any of the edit pages. Why? He needs to have access to the "tinyMCE" input filter.

3. Clear site cache and views cache
Path for Views Cache: mysite.com/admin/build/views/tools
Sometimes site cache and views cache can result in strange permissions problem. Site cache can be reset with the Developer module "Empty cache" menu option. To have this appear, you need to enable the Devel block. In addition to clearing the site cache, sometimes it helps to clear the ciews cache. This is especially true if your permissions problems started after you edited a view. The option to clear views cache can be found in the Tools section of the ciews administration page.

4. If all else fails, rebuild node permissions
Path: mysite.com/admin/content/node-settings/rebuild
Sometimes Drupal node permissions get corrupted. When this happens, rebuilding the node permissions can solve the problem. Please be advised that if you have a lot of nodes, this can take a very long time.

5. The Last Step: Looking for Module-Specific Issues
Path for Update Script: mysite.com/update.php
If none of the previous steps work, I usually try to figure out if the problem is caused by a module that I just installed. First, if I recently installed a new version of a module, I make sure that I have run the update.php script. Next, I generally disable the module, and then repeat step three.

Please let me know if there are other ways of hunting down and fixing permissions issues that you know about.

This Saved My Site

Tue, 07/01/2008 - 22:44
Anonymous (not verified)

I am currently trying to meet a deadline by Friday and Step 4 saved my site. Thank you for putting this list together. I had been Googling around all day long. :D

Drupal Debugging

Tue, 07/01/2008 - 11:41

Drupal can have a few issues, but luckily, there is a huge support group of people that are willing to help any fellow Drupal user.

Thank you

Thu, 05/29/2008 - 14:46
Jabapyth (not verified)

ths is exactly what I needed. Thank you.

Wish I had this before

Fri, 01/25/2008 - 01:48
Ruby Sinreich (not verified)

Thanks again for your help when I cleverly disabled my own permissions on my drupal site! I'm glad to see my predicament inspired this handy checklist. :-)

You're everywhere!

Tue, 03/18/2008 - 12:47
Julia

I can't believe that you were able to find this post and make the connection to our earlier discussion. So cool!

Thanks!

Thu, 02/07/2008 - 04:19
Pawel Pohl (not verified)

Saved my site, I was unable to create viewable content after messing with Acidfree and Taxonomy Access. Thanks for reminding me about rebuilding permissions!