By pirmin on
After a fresh install of drupal and the mysql database, I create Page content, publish to front page and anonymous users get:
"Access denied
You are not authorized to access this page. ".
I've installed drupal from Fedora packages, currently drupal 6.16, php 5.3.1, mysql 5.1.42. Anonymous has "Access Content" permission enabled.
select * from node_access;
+-----+-----+-------+------------+--------------+--------------+
| nid | gid | realm | grant_view | grant_update | grant_delete |
+-----+-----+-------+------------+--------------+--------------+
| 0 | 0 | all | 1 | 0 | 0 |
+-----+-----+-------+------------+--------------+--------------+
select * from permission;
+-----+-----+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----+
| pid | rid | perm | tid |
+-----+-----+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----+
| 2 | 1 | access content | 0 |
| 42 | 2 | access comments, post comments, post comments without approval, access content | 0 |
| 52 | 12 | access content | 0 |
| 62 | 22 | administer blocks, administer comments, administer filters, administer menu, administer simplemenu, access administration pages, access site reports, administer actions, administer files, administer site configuration, access user profiles, administer permissions, administer users | 0 |
+-----+-----+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----+
I have no idea why anonymous visitors can't see this content.
Comments
The database is replicated
The database is replicated and uses an auto_increment offset (greater than 1).
I tried it with a non-replicated database and still get this issue:
I've checked apache's config for Drupal and the $cookie_domain in settings.php but to no avail.
The strange thing is that on another server, running the exact same drupal, php and mysql versions, the issue isn't present, i.e. I can change "Access Content" for anonymous and it works as expected. The other server has been running for some time. Now, the only real difference between the setup that works and that which doesn't is that the setup which doesn't work connects with MySQL over the network while the setup which works connects with MySQL running on the localhost.
Additionally, on the setup with the 'remote' mysql server I have the following selinux bool set as:
setsebool -P httpd_can_network_connect 1
Drupal can connect and doesn't otherwise complain about the MySQL database connection.
A debug module would/could be informative.
Solved
When I tested this with the non-replicated database, the auto_increment had still been set to a value greater than 1.
I've now tested this with an auto_increment value of 1 and it works, i.e. changing "Access Content" for anonymous leads to the expected behaviour.
Reference
See http://drupal.org/node/118066