Hi,

The only user that can access content is the first user/admin. For all others -authenticated and unauthenticated- the following message is displayed when trying to access content or view the frontpage:

'Access denied-You are not authorized to access this page.'

I'm working with a brand new installation of Drupal 5.
Admin login is working fine.

I granted 'access content' at the node module for all user roles.

But exept for the admin nobody can access content, no matter whether he's authenticated or anonymous.

The login-function in iteself seems to be working. For example I can login as normal authenticated user and get access to functions like 'administer menus'. But I don't get access to content.

Some info on my System as displayed by Drupal:
Drupal 5.0
Configuration file Protected
Cron maintenance tasks Never run
Cron has not run. It appears cron jobs have not been setup on your system. Please check the help pages for configuring cron jobs. You can run cron manually.
Database schema Up to date
File system Writable (public download method)
GD library bundled (2.0.28 compatible)
MySQL database 3.23.55
PHP 4.4.1
Unicode library PHP Mbstring Extension
Web server Apache/1.3.27 (Linux/SuSE) FrontPage/4.0.4.3 PHP/4.4.1 mod_perl/1.27 mod_ssl/2.8.12 OpenSSL/0.9.6i

I'm quite new to Drupal, any help is highly appreciated.

Thanks,
Ralf

Comments

add1sun’s picture

Like tac_lite or the like? Sometimes if you activate an AC module after you created content, it blocks it. If so, you can resave the content (i.e. go to node, edit tab, then submit) and then it will appear again.

Drupalize.Me, The best Drupal training, available all the time, anywhere!

Ralf Skirr’s picture

Thanks for your suggestion. I just checked the installed modules.
'Persistent login ' is the only access control module installed.
The Persistent Login module provides the familiar "Remember Me" option in the user login form.

It was installed before I created content.
Is it likely that this interferes with the access to content in the way I described above?

Ralf

cog.rusty’s picture

Not very likely, but you can find out by disabling it for a while.

You can also check the 'node_access' table in the database to see if it contains a row with values "0, 0, 'all', 1, 0, 0".

Ralf Skirr’s picture

I disabled the persistent login-module, as expected it did not help.

My node_access table looks like this (no idea what it most of it means):
BTW, it's German, 'Bearbeiten' means 'Edit', 'Löschen' means 'Delete'

vollständige Textfelder nid gid realm grant_view grant_update grant_delete
Bearbeiten Löschen 1 0 all 1 0 0
Bearbeiten Löschen 2 0 all 1 0 0
Bearbeiten Löschen 3 0 all 1 0 0
Bearbeiten Löschen 4 0 all 1 0 0
Bearbeiten Löschen 5 0 all 1 0 0
Bearbeiten Löschen 6 0 all 1 0 0
Bearbeiten Löschen 7 0 all 1 0 0
Bearbeiten Löschen 8 0 all 1 0 0
Bearbeiten Löschen 9 0 all 1 0 0
Bearbeiten Löschen 10 0 all 1 0 0
Bearbeiten Löschen 11 0 all 1 0 0
Bearbeiten Löschen 12 0 all 1 0 0
Bearbeiten Löschen 13 0 all 1 0 0

cog.rusty’s picture

If nodes 1-13 are all your nodes then that should be ok...

Ralf Skirr’s picture

I don't have more nodes yet,
it's a fresh install (my first one) and I'm still experimenting :-)

Ralf Skirr’s picture

I I checked 'access content' at the node module for all user roles.
Should that be enough to make the content visible?

Or are there any other important settings in the administer area that I might have overlooked?

cog.rusty’s picture

"Access content" should be enough for everything.

We have already established that no access control module is interfering with your node access table.

Some additional sanity checks, in case something went wrong during setup. Make sure that:
- your 'user' table contains a row with uid = 0 (this is the anonymous user)
- your 'users_roles' table contains a row with uid = 0 and rid = 1 (anonymous user and anonymous user role)
- your 'permission' table contains a row with rid = 1 (the anonymous user role) with the corresponding permissions (including 'access content').
If everything is ok then a non-logged-in user should be able to view the nodes.

-------------

Edited to add: You can also try this using phpMyAdmin:

INSERT INTO node_access VALUES (0, 0, 'all', 1, 0, 0);

(if your table names have a prefix, use 'yourprefix_node_access')

Ralf Skirr’s picture

CogRusty, I checked the 3 tables you mentioned

- your 'user' table contains a row with uid = 0 (this is the anonymous user)
OKAY

- your 'permission' table contains a row with rid = 1 (the anonymous user role) with the corresponding permissions (including 'access content').
OKAY

- your 'users_roles' table contains a row with uid = 0 and rid = 1 (anonymous user and anonymous user role)
NOT OKAY, While there is a 'user role table' providing the fields 'uid' and 'rid' there seem to be no entries in the table

Now I looked at the admin page Administer / User Management / Roles. There are 2 roles available:
Name Operations
anonymous user locked edit permissions
authenticated user locked edit permissions

In case this is the source of the problem, what would be the next step to fix it?

cog.rusty’s picture

About case #3, the roles_users table, unfortunately I misspoke. It is OK that you have no entries there.

The entries for the anonymous role (1) and the authenticated role (2) have been removed from 'users_roles' since Drupal 4.7.0 and are no longer needed. I was just relying on a suggestion from an older forum post.

What you found in /admin/user/roles are the same things that you set up in /admin/user/access

So, only my last suggestion remains to be tried, inserting a row to 'node_access'.

Ralf Skirr’s picture

I tried, but it did not change anything.

I guess tomorrow I will take some time to check every single setting, maybe disable all modules 1 by 1 and if nothing works uninstall the whole thing. *urghs*

:-(

Ralf Skirr’s picture

seems I found something...

Nor sure yet, but I'll add it here when it really works.

ahoria@drupal.org’s picture

I have the exact same symtoms on my Drupal 5 upgraded site.

Any solutions?

nkoponen’s picture

I'm not using the category module.

Ahoria, have you solved this?

-Niklas

Ralf Skirr’s picture

okay, I solved it and want to post what happened in case others have the same problem

You may be affected when you have installed the category module: http://drupal.org/project/category

As we suspected from early on a module was restricting the access to the nodes.

But it was difficult to detect because
- the particular module that caused the problem is not listed in drupal's modul download pages (which I used as reference to find access related modules)
- It is an automatically installed sub-module (maybe not a proper technical term) that comes with installation of the category module
- it it sails under different names in you system, module section in admin area calls it 'Category access control lite'

- Here's the problem: The module is buggy, so that it does not display it's setting pages in the admin area. It also does not display any setting to grant access at the specific nodes. Of course if you don't have any settings available you don't know that there is something in your installation that restricts the access

One more thing: strangely the module was also affecting access to nodes that had no relation to any of the categories.

Solution: Got to administer/sitebuilding/modules/category/Category access control lite and uncheck the box.
(This is not a link, but the way you have to go through your administer pages)

I'm not so sure now if using the category module is a good idea or whether I will go back to simple taxonomy. Having such a basic function like categorization of content relying on a non core module might be risky on the long term.

Would be interesting to hear what others think...

Ralf Skirr’s picture

there seems to be a fix for the problem, I have not tried it
http://drupal.org/node/110591

I'm still not sure whether I'll stick with category module

ba5155’s picture

The solution helped me. Really i am very happy after a long search. Now i can see all the nodes as a anonymous user. Thanks again.

Travstar’s picture

None of those things worked for me! i dont even have that module installed.

the weird thing is, anonymous users can see only one stroy node; the very first one created. thats it.

the site in question is www.seahawks.org.au/drupal any more advice???

add1sun’s picture

Follow this FAQ and see if that helps.

http://drupal.org/node/64114

Drupalize.Me, The best Drupal training, available all the time, anywhere!

gemini’s picture

I tested a few modules even though I ended up not turning them off, suddenly none of the members could view any nodes.. they could submit them, but not view. Also, I found it interesting that the glitch would go away when I let them to "administer nodes", but that wasn't originally allowed. After reading this thread I checked my node_access table and saw that there were no records. I inserted the record noted in the FAQ and now everything works as it supposed to.

Thanks!

Dustin Boston’s picture

I had the same problem. In my case I had installed Organic Groups (and several other modules). I just disabled and uninstalled all the contributed modules that I had uploaded. I think that there was a bug with Organic Groups that was preventing access to the pages. I still had problems so I enabled it again and then re-disabled it. After that everything worked great.

Diagnosis:
I would say that this problem looks to be solidly caused by errant modules.

Solution:
Disable contributed modules. Re-enable and repeat a second time if the problem doesn't go away after the first time.

Let us know if this works!

gjk’s picture

I had the same problem and it was driving me crazy. I can confirm that the above solution worked. I simply disabled all category modules, book module, forum module and organic group module and enabled them again. This fixed all access problems. Thanks a lot for your work everybody.

j0k3z’s picture

Wasted a whole day because of this problem but ADD1 is correct, this is how I fixed my site in 30 seconds:

http://drupal.org/node/64114

Thanks!

thollowood’s picture

You could try something simple (albeit embarrassing to admit). I went around for about 2 hours running queries and looking for patches. Then I decided to look more closely at my posts. After creating the home page, I had gone on to make more posts, and I had submitted, but not PUBLISHED them. So, duhhhhhhhhhhhhhhhh, maybe that will help someone who is in need of a vacation (or lobotomy) as much as I am.