access denied when viewing profiles of other users I am having a hard time finding out why non admins (and anonymous users) are having 
"access denied" errors when looking at Drupal-7 profiles of other users. 

The "View user profiles" permission is checked.

My user's profile page is a panel, but the 'access denied' errors even if the profile is not a panel.

Any idea? Please help.

Additional Information:

Using a code inspired by Yuriy Babenko's answer, and filterning for uniqueness, I see the following pemissions are denied when user 163 views the profile of user 174 (goes to /user/174) :

access administration menu
access administration pages
access all views
administer block classes
administer blocks
administer contexts
administer less
administer media
administer menu
administer user relationship
administer users
administer views
bypass node access
execute php code
view any private_notification content
view own unpublished content
view the administration theme  

I don't see anything related to user access...

The nice Access Denied Backtrace module gives the following backtrace, but how to interpret it? 

Array
(
    [ 2: drupal_deliver_page()] =&gt; Array
        (
            [file] =&gt; includes/common.inc:2564
            [args] =&gt; Array
                (
                    [0] =&gt; 3
                    [1] =&gt; 
                )

        )

    [ 1: menu_execute_active_handler()] =&gt; Array
        (
            [file] =&gt; includes/menu.inc:532
            [args] =&gt; Array
                (
                )

        )

    [ 0: main()] =&gt; Array
        (
            [file] =&gt; index.php:21
            [args] =&gt; Array
                (
                    [q] =&gt; user/174
                )

        )

)


HOTFIX: Adding the following code before line 820 of user.module temporarily solved the issue:

if (arg(0) == 'user' &amp;&amp; is_numeric(arg(1)) &amp;&amp; is_null(arg(2)) &amp;&amp; 
    $string == 'administer users' ) {
  return TRUE;
}


But how do I find why the 'administer users' permission to view other user profiles?
Impossible to say exactly without having access to your site, but something ON the profile page is causing this.

Do this (assuming you're on Drupal 7):


Open /modules/user/user.module
Scroll down to line 820 (which should be: return isset($perm[$account-&gt;uid][$string]);)
Immediately above that line, add this code:


.

if (!isset($perm[$account-&gt;uid][$string])) {
  echo 'denied permission: ' . $string . '&lt;br/&gt;';
}



Reload the page as a user that's getting Access Denied, and you'll get a printout of all permissions the current user got denied - one (or more) of them will be the culprit. 


Don't forget to remove the code changes once you've found the issue.