Answers.Body: <p>The errors in your log that you note are not a problem, they are CiviCRM doing a little security check for you (and succeeding).</p>
  
  <p>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:</p>
  
  <ol>
  <li>If you're logged in, CiviCRM does a fair amount of these checks before rendering the page.</li>
  <li>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.</li>
  </ol>
  
  <p>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.</p>
  
  <p>In my case, extending the default backend timeout in my varnish configuration eliminated the problem.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-23T11:30:53.283Z
Answers.Text: Thanks Alan. I don't think this is an answer though. Perhaps better posted as a comment?
Answers.UserDisplayName: Graham
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-11-22T17:43:58.147Z
Answers.LastActivityDate: 2017-05-23T14:36:52.843Z
Answers.LastEditDate: 2017-05-23T14:36:52.843Z
Answers.UserDisplayName: Alan Dixon
Answers.Body: <p>A client reported this issue to us recently and after some investigation we found the cause to be the way that particular profiles had been setup.</p>
  
  <p>In short, any active profile with ‘View/Edit Drupal User Account’ option selected AND if you have a group selected in the ‘Limit listings to a specific Group?’ (under advanced setting of the profile) causes this message to appear when you switch from a Drupal page to a CiviCRM page.</p>
  
  <p>This was reproduced on the demo site today (23rd April 2020).</p>
  
  <p>Solution to resolve this issue for the client was to remove the group from the ‘Limit listings to a specific Group?’ option under advanced settings of the profile as this was not required.</p>
  
  <p><a href="https://i.sstatic.net/nJ5ml.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/nJ5ml.png" alt="enter image description here"></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-23T19:11:37.327Z
Answers.Text: good sleuthing!
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-23T12:24:44.290Z
Answers.LastActivityDate: 2020-04-23T12:24:44.290Z
Answers.UserDisplayName: Anil
Answers.Body: <p>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.</p>
  
  <p>My answer is to use Word Replacements feature under Administer > Customize. </p>
  
  <p>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.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-29T14:42:51.930Z
Answers.Text: That brightened my day, thanks. A great example of how to make the best of things!
Answers.UserDisplayName: Graham
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-08-22T02:36:52.543Z
Answers.Text: I having this error display itself to all users on our donate page. Thanks for the suggestion!
Answers.UserDisplayName: Christia
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-07-28T22:36:27.580Z
Answers.LastActivityDate: 2017-07-28T22:36:27.580Z
Answers.UserDisplayName: CiviTeacher
Body: <p>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."</p>
  
  <p>If I simply ignore it and carry on then all seems fine. In the error log I see the following lines:</p>
  
  <pre><code>[Tue Jan 26 10:46:17 2016] [error] [client 81.95.52.80] 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 81.95.52.80] 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 81.95.52.80] 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 81.95.52.80] Attempt to serve directory: /home/mysite/sites/default/sites/default/files/civicrm/persist/contribute/
  </code></pre>
  
  <p>The files mentioned in the second and third lines above don't exist.</p>
  
  <p>If anyone has any advice about how to tackle this I'd be grateful.</p>
  
  <p>EDIT: <a href="https://issues.civicrm.org/jira/browse/CRM-18300" rel="noreferrer">CRM-18300: "Permission denied" message re contact on CiviCRM dashboard</a></p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-01-26T11:49:19.987Z
Comments.Text: Is this in Drupal? Try rebuilding the permissions from the Drupal status report.
Comments.UserDisplayName: liblogger
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-01-26T23:50:11.927Z
Comments.Text: @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.
Comments.UserDisplayName: Graham
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-01-27T20:57:20.950Z
Comments.Text: 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.
Comments.UserDisplayName: liblogger
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-03-17T10:55:34.600Z
Comments.Text: Have you had any success with this error Graham?
Comments.UserDisplayName: Heather O.
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-03-21T15:51:57.997Z
Comments.Text: Unfortunately not. It doesn't seem to be causing any problems other than the appearance of the error message when I first log in and go the CiviCRM home page, so I've chosen to ignore it for now. However, I remain keen to resolve it.
Comments.UserDisplayName: Graham
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-03-25T04:49:33.237Z
Comments.Text: Welcome to CiviCRM.SE. Please note that this is not a discussion forum, and answers should only be used to address the original question directly. Once you have earned sufficient site reputation, you can leave a comment such as this one for clarifications. I encourage you to take the site [tour] and review the [help] for additional guidance.
Comments.UserDisplayName: choster
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-03-25T23:09:07.113Z
Comments.Text: i used to see this regularly on a 4.4.x site - which started its life back in 1.4 i think -what version is yours on
Comments.UserDisplayName: petednz - fuzion
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-03-26T17:59:31.327Z
Comments.Text: Those error messages in your webserver access log are not symptoms of a problem - they are caused by internal methods requesting those files to check they *aren't* available, eg [`CRM_Utils_Check_Component_Security::checkLogFileIsNotAccessible()`](https://github.com/civicrm/civicrm-core/blob/4e3acd4be7b6818781bd26148621519ce36dfe5c/CRM/Utils/Check/Component/Security.php#L51).
Comments.UserDisplayName: Chris Burgess
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-03-26T18:00:52.500Z
Comments.Text: I've seen this error message too ... when I log in and visit the CiviCRM dashboard on www.civicrm.org :) If I run into it in an environment where I can debug it, I will.
Comments.UserDisplayName: Chris Burgess
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-06-14T22:31:01.070Z
Comments.Text: Hello, any idea about how to fix this issue ?
Comments.UserDisplayName: HashKey
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2016-11-18T17:51:56.683Z
Comments.Text: 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.
Comments.UserDisplayName: Christia
Tags: <permissions>
Title: Strange 'Permission Denied' message when browsing to CiviCRM home page
ThreadText: # Strange 'Permission Denied' message when browsing to CiviCRM home page
  
  (Asked by: username_0 on 2016-01-26)
  
  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 81.95.52.80] 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 81.95.52.80] 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 81.95.52.80] 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 81.95.52.80] 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](https://issues.civicrm.org/jira/browse/CRM-18300)
  
  **Tags:** permissions
  
  > **Comments:**
  > **username_1**: Is this in Drupal? Try rebuilding the permissions from the Drupal status report.  
  > **username_0**: @username_1 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.  
  > **username_1**: 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.  
  > **username_2**: Have you had any success with this error username_0?  
  > **username_0**: Unfortunately not. It doesn't seem to be causing any problems other than the appearance of the error message when I first log in and go the CiviCRM home page, so I've chosen to ignore it for now. However, I remain keen to resolve it.  
  > **username_3**: Welcome to CiviCRM.SE. Please note that this is not a discussion forum, and answers should only be used to address the original question directly. Once you have earned sufficient site reputation, you can leave a comment such as this one for clarifications. I encourage you to take the site [tour] and review the [help] for additional guidance.  
  > **username_4**: i used to see this regularly on a 4.4.x site - which started its life back in 1.4 i think -what version is yours on  
  > **username_5**: Those error messages in your webserver access log are not symptoms of a problem - they are caused by internal methods requesting those files to check they *aren't* available, eg [`CRM_Utils_Check_Component_Security::checkLogFileIsNotAccessible()`](https://github.com/civicrm/civicrm-core/blob/4e3acd4be7b6818781bd26148621519ce36dfe5c/CRM/Utils/Check/Component/Security.php#L51).  
  > **username_5**: I've seen this error message too ... when I log in and visit the CiviCRM dashboard on www.civicrm.org :) If I run into it in an environment where I can debug it, I will.  
  > **username_6**: Hello, any idea about how to fix this issue ?  
  > **username_7**: 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.  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_8 on 2016-11-22. Score: 4
  
  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.
  
  > **Comments:**
  > **username_0**: Thanks username_8. I don't think this is an answer though. Perhaps better posted as a comment?  
  
  ---
  
  ### Answer by username_9 on 2020-04-23. Score: 2
  
  A client reported this issue to us recently and after some investigation we found the cause to be the way that particular profiles had been setup.
  
  In short, any active profile with ‘View/Edit Drupal User Account’ option selected AND if you have a group selected in the ‘Limit listings to a specific Group?’ (under advanced setting of the profile) causes this message to appear when you switch from a Drupal page to a CiviCRM page.
  
  This was reproduced on the demo site today (23rd April 2020).
  
  Solution to resolve this issue for the client was to remove the group from the ‘Limit listings to a specific Group?’ option under advanced settings of the profile as this was not required.
  
  [![enter image description here](https://i.sstatic.net/nJ5ml.png)](https://i.sstatic.net/nJ5ml.png)
  
  > **Comments:**
  > **username_4**: good sleuthing!  
  
  ---
  
  ### Answer by username_10 on 2017-07-28. Score: 2
  
  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. @username_8 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.
  
  > **Comments:**
  > **username_0**: That brightened my day, thanks. A great example of how to make the best of things!  
  > **username_7**: I having this error display itself to all users on our donate page. Thanks for the suggestion!  
  
  ---
  
  