views:

1392

answers:

4

I have been wracking my brain on how to solve this issue for hours now, and I know I'm not the first one to encounter it.

I am having trouble granting anonymous users access to node content in Drupal 6.15. I have tried everything, including inserts to MySQL, checking and double-checking every permissions setting available (yes, I have enabled "Access content"), rebuilding permissions, and clearing the cache. I have disabled custom modules in hopes of clearing out a conflict but still no luck. Anonymous users get the "Access Denied" page everywhere but on a custom calendar View page.

I have tried these queries, but they are just duplicates of what is already there:

INSERT INTO users (uid, name, mail) VALUES (0, '', '');
INSERT INTO users_roles (uid, rid) VALUES (0, 1);
INSERT INTO node_access VALUES (0, 0, 'all', 1, 0, 0);

My only glimmer of hope: the Devel Module's "Access Permissions by User" display indeed shows that user:Anonymous cannot view content (SEE IMAGE). It raises a baffling question: how is it that "All users may view all nodes" while user:Anonymous simultaneously has "NO:access content" ???

This is driving me nuts. If anyone can alert me as to what I am doing wrong, I will jump up and down in excitement, and buy you a beer if you are in Seattle.

THANKS!

alt text

A: 

This is very typical of Drupal: permissions problems. While I'm aware I'll probably be unable to offer the correct answer, maybe at least I'll trigger some revolutionary idea in you that will help you solve the problem.

While node access is a standard permission that should be on, there are others that might restrict the users. Do you have freelinking on? If so, check that the freelinking access is also on. You might want to make sure that access control modules (ACL and ones that rely on it, such as Forum Access) don't get in the way. Also, taxonomy access control can be a pain: I've had problems with Taxonomy Access Control Lite (tac_lite). Try disabling it too if you have it.

I apologise for not being able to offer anything more specific than this, but Drupal is just like that. Solving permissions issues rarely requires hacking the code.

mingos
Thanks -- it does seem like a common problem. I don't have any of those modules running, but here are is a list of what I do have: Content, Content Permissions, Number, Text, Blog, Comment, Database logging, Help, Locale, Menu, PHP Filter, Calendar, Date, Date API, Date Locale, Date Timezone, Devel, Devel node access, Views, Views UI. I have tried disabling/enabling them all and nothing seems to change.
Marcy Sutton
Is it a clean install of Drupal? When an anonymous user enters the site, does he see the front page? Which pages can't he see (primary links, nav elements, none)? Is there a "permission denied" message, or are the pages simply invisible?
mingos
It is a clean install.... Anonymous users can see the user interface, but the node content says "Access Denied" -- seems like a node permissions issue, but Views are ok.
Marcy Sutton
Have you tried disabling Content Permissions? What about hacking core with using PHP's "die" language construct in node_access (http://api.drupal.org/api/function/node_access/6) to see what's going on? That is where I'd start.
CalebD
I actually narrowed it to a problem with the client's server, as I installed the exact same files on my own server and was able to access content. Thank goodness, I was starting to go nuts. I will report back...
Marcy Sutton
A: 

I've had exactly the same problem since upgrading from 6.14 to 6.15. Tried only on 2 difference local OSX systems, so intrigued to find your server related problems... is PHP version related - I'm running PHP5.2 on all installs.

Rebuilt permissions table and looked at every conceivable user permission, but anon users get the same 'Please Login to Continue'. Looks like it's worth posting an issue in the Drupal issue queue.

Rob
A: 

Since I went to 6.15 I've had problems with permissions left and right. The site wasn't 100% debugged in 6.14 so I can't say logically it definitely was 6.15's fault, but my intuitions can and do say so.

I have a role I call content manager that has all the CRUD (create, read, update, delete) permissions on all content types.

To let the System Admin (user #1) edit stories I had to give it that role. Right now I'm having problems letting that role edit stories. A user with that role assigned gets 'access denied' errors.

The only other module I have that manipulates permissions is 'role delegation' so certain end users can be given access to assigning roles, but not edit roles or to assigning permissions to roles. I still have to chase down this and the possibility of a corrupt permission table. But the possibility that 6.15 is the culprit still exists.

Dave Keays
A: 

Scratch part of that. Somehow my input filters were screwed-up.

I should have checked it sooner, but I still have a couple of questions. Why didn't user#1 have access to all? Why did this suddenly happen? Did I screw up the settings or was it done automatically for me (sounds like Microsoft).

Dave Keays