Normally, anonymous users must have 'access content' permission in order to view any content. But on my installation, they must have 'administer nodes' permission too. Otherwise they will see "You are not authorized to access this page" error message.

My setup:
Drupal 5.1
MySQL 5.0.27
PHP 5.2.0
Installed modules: CCK (content, text), IMCE, Poormanscron, System Info

I suspect CCK but really have no idea why anonymous users must have 'administer nodes' permission only to access content.

Comments

mfer’s picture

Was this on a clean install or an upgrade?

If you take a look into your database in the users table do you have a line with uid of 0? If so, in the users_roles table do you have a row with uid = 0 and rid = 1? If so, in the node_access table do you have a role with the values nid = 0, gid = 0, realm = all, grant_update = 0, and grant_delete = 0?

If you are missing any of these you will get this error.

Borek-1’s picture

It was a clean install and all relevant database tables contain user 0 as described (I did a quick research before I posted a bug, of course, so I know about these common issues). Everything seems to be perfectly OK but anonymous visitors still need 'administer nodes' permission in order to access any content.

Borek-1’s picture

Status: Active » Closed (fixed)

Oops, it looks like the content was unpublished! Sorry, my fault (and bad error message from Drupal - but I'm a Windows user so I am used to it).

But it takes us to another question: isn't it bug if the anonymous user can access unpublished content if he (accidentally) has 'administer nodes' permission? Anyway, this issue is closed.

swami’s picture

Version: 5.1 » 6.2
Status: Closed (fixed) » Active

Hello, I had Drupal 6.1 on Postgres, that I upgraded to 6.2.
I then installed the latest Beta version of CCK.
I'm running into the exact same problem.
I found that the users_roles table didn't have the entry mentioned in the 1st comment. (This looks like a bug). I manually added the entry.
I ensured that my content is published, but find that anonymous users still get an error:
Access denied
You are not authorized to access this page.

Can you help, please?

swami’s picture

Status: Active » Fixed

Upgrading to the latest RC version (RC3) seems to have fixed it. The release notes mentions this as well. http://drupal.org/node/278309

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.