On a site I've been working on for several years, when I log in to the site, I find that when I browse to the CiviCRM home page /civicrm?reset=1 I get a weird message: "Permission Denied: You do not have permission to view this contact record. Contact the site administrator if you need assistance."

If I simply ignore it and carry on then all seems fine. In the error log I see the following lines:

[Tue Jan 26 10:46:17 2016] [error] [client] client denied by server configuration: /home/mysite/sites/default/sites/default/files/civicrm/ConfigAndLog/CiviCRM.b94a921de7121c494a80645638b20a34.log
[Tue Jan 26 10:46:17 2016] [error] [client] client denied by server configuration: /home/mysite/sites/default/sites/default/files/civicrm/upload/delete-this-VJYWu2ovE4
[Tue Jan 26 10:46:17 2016] [error] [client] client denied by server configuration: /home/mysite/sites/default/sites/default/files/civicrm/custom/delete-this-uYgWNHRSxL
[Tue Jan 26 10:46:17 2016] [error] [client] Attempt to serve directory: /home/mysite/sites/default/sites/default/files/civicrm/persist/contribute/

The files mentioned in the second and third lines above don't exist.

If anyone has any advice about how to tackle this I'd be grateful.

EDIT: CRM-18300: "Permission denied" message re contact on CiviCRM dashboard

  • Is this in Drupal? Try rebuilding the permissions from the Drupal status report. – liblogger Jan 26 '16 at 11:49
  • @liblogger The site uses Drupal, but the message only appears when I first hit a CiviCRM page as a logged in user, and is an error message generated by CiviCRM. – Graham Jan 26 '16 at 23:50
  • Drupal has permission settings for CiviCRM, even if you're actually using ACLs to control access, which will prompt CiviCRM to generate relevant error messages- or irrelevant, in this case. I know I've had the same experience (error message but still able to access everything), and this was a possible solution - I'm not adding this as answer because it was a while ago and I don't remember if this worked or if it just went away a while. – liblogger Jan 27 '16 at 20:57
  • Have you had any success with this error Graham? – Heather O. Mar 17 '16 at 10:55
  • 1
    Just a though, but, do you have any dashboard reports that might contain some contacts that have been deleted? Have you tried removing all of your dashboard reports to see if the problem goes away? Basic I know, but worth mentioning. – Christia Nov 18 '16 at 17:51

The errors in your log that you note are not a problem, they are CiviCRM doing a little security check for you (and succeeding).

I've seen this occasionally on my servers, and especially on my staging server. I believe that the cause is indirectly related to the errors you are seeing, in that:

  1. If you're logged in, CiviCRM does a fair amount of these checks before rendering the page.
  2. If you have production-type settings on a not-super-fast server, then you can get timeouts of various flavours that aren't necessarily going to show up in your apache/webserver logs.

As you probably also experience, just reloading the page will solve the issue, presumably because CiviCRM and or the webserver is using some kind of caching so it doesn't take so long.

In my case, extending the default backend timeout in my varnish configuration eliminated the problem.

  • Thanks Alan. I don't think this is an answer though. Perhaps better posted as a comment? – Graham Nov 23 '16 at 11:30

I have rarely seen this error display itself when an actual permissions problem has occurred that is preventing work getting done. Normally it shows up for no good reason that I can tell. @alandixon may be right that it has something to do with server cache or delay. I've turned this situation into a positive.

My answer is to use Word Replacements feature under Administer > Customize.

Change "Permission Denied" to "Welcome Back" and the rest of the text to "It's good to see you again." Civi is now more friendly than ever.

  • That brightened my day, thanks. A great example of how to make the best of things! – Graham Jul 29 '17 at 14:42
  • I having this error display itself to all users on our donate page. Thanks for the suggestion! – Christia Aug 22 '17 at 2:36

protected by Community Jun 1 '16 at 15:44

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.