Access Denied in Admin
momendo - August 23, 2005 - 13:30
I'm getting an access denied error while logged into my drupal installation. I'm logged in as my admin user and when I navigate to sections within the admin I have access denied errors. It shows that the Anonymous user is denied however I'm logged in as my admin user. It's not preventing me from accessing anything but I'm not logged in as anonymous! What could be going on?
Sample logs:
access denied 2005-08-23 12:45 admin/logs/event/2214 denied access. Anonymous view details
access denied 2005-08-23 12:39 admin/settings/statistics denied access. Anonymous view details
access denied 2005-08-23 12:01 admin/help/taxonomy denied access. Anonymous view details

top of my head, i'd first
top of my head, i'd first check the following
- browser is not interfering with cookies
- you are logged in as the first registered user (userid ==1) not a subsequent user (go to "my account" and check the url).
- check web server error logs for any permission denied msgs
- if all else fails, you can edit includes/common.inc
find the line that reads:
if ($errno & (E_ALL ^ E_NOTICE)) {
temporarily comment out that line and add:
//if ($errno & (E_ALL ^ E_NOTICE)) {
if ($errno & (E_ALL)) {
access the site again and try to sort through all the noise for more info :)
I'm getting this too.
Sorry also if I'm posting in a dead topic, but I'm getting this exact problem.
It only happens when I have my Drupal site open in more than one browser window. I hope this is just an annoyance.
Same thing happens for me
I see access denied for operations I am dong as administrator. For example posting new content will give me an access denied error in the log as an anonymous user while the content gets posted correctly. The anonymous user has an IP address that is not on my system at all, but it is always the same. I will look into some other logs to see if anything else is going on.
The same for me, it seems to be a Google Bot
I having the same situation, the ip of the "Anonymous" user is 66.249.65.46. This IP is from Google, so it seems their bot is indexing the system, but the big question is:
HOW THEY GOT ACCESS TO THE URLS OF THE ADMIN AREA????
That urls are not public, or are they?
The only thing I had i my head is that they are geting the urls that I navigate from their Google Bar, Google Desktop or wathever.
Any other people seeing a similar behaviour?
It is easy to find the location of an IP using this service:
http://www.ip2location.com/free.asp
warning access denied 2005-10-18 14:45 admin/logs/event/36230 denied access. Anonymous view details
warning access denied 2005-10-18 14:45 admin/logs/event/36230 denied access. Anonymous view details
warning access denied 2005-10-18 14:45 admin/logs/event/36232 denied access. Anonymous view details
warning access denied 2005-10-18 14:44 admin/logs/event/36232 denied access. Anonymous view details
warning access denied 2005-10-18 14:44 node/add/story denied access. Anonymous view details
warning access denied 2005-10-18 14:44 node/add/story denied access. Anonymous view details
warning page not found 2005-10-18 14:44 news/modules/glossary/glossary.css not found. Anonymous details
warning access denied 2005-10-18 14:41 admin/user denied access. Anonymous view details
warning access denied 2005-10-18 14:41 admin/user denied access. Anonymous view details
warning access denied 2005-10-18 14:40 admin/filters denied access. Anonymous view details
UPDATE: Google could pick the URL from the Adsense Units (if you have those in your pages), and send a quick-crawler to determine what ads to provide on these pages.
Luis Flores
http://www.solutionsdepot.com
admin denied access
I have this trouble too ... but it is definately action I am doing as admin ... and then and 'admin denied access' appears. Haven't figured it out yet. In my case .. the referer is an IP I cannot ping. Haven't figured it out yet.
Node Edit Denied Access
http://drupal.org/node/92712
***I cant edit my content.....this happened recently, but I have had many posts and when editing previous content, I was `kicked out' and get
403 error page
The web browser says `You dont have access to the /sitename on this server ....
Whereas Drupal watchdog says ``access denied 03/11/2006 - 7:08pm node/23/edit denied access.
Anonymous view'
****What if this happens when we are presenting it to our clients? Pretty scary and felt like giving up
I'm getting those too
What I'm assuming is it's because of the adsense advertising on my pages. This jives with the other respondant saying the denied access was by googlebot.
See... for google/adsense to know what your page topic is, they have to scan the page. You might thing "hasn't the search engine already scanned my site?" ... but that's ignoring the separation google maintains between the search engine and the adsense.
I heard this direct from the mouth of their senior adsense people -- about a year ago I attended a "users forum" about adsense at a Google campus building. It was a great event, and I learned a lot. One of which is they maintain a strict separation between the search engine index, and what the adsense service does to figure out which page means what.
In any case what that means here is that if you have adsense ads showing up on admin pages, googlebot will try to scan them to learn their meaning so adsense can serve relavent advertising. However googlebot isn't you and therefore it can't access the admin pages.
- David Herron - http://7gen.com/
Disable Ads in Admin
I configured the Google Ads block to only show in all the node types, effectively removing the ads from the admin pages.
Click Administer -> Blocks -> Google block -> Configure ->Restrict block to specific content types:
Select all checkboxes.
This will remove the ads from the home page though.
Interference from firewall
If it is of any help at all, I had the same problem and found that it could be resolved by turning off my firewall. Obviously this is not an ideal solution so the next step is to figure out which settings to modify in the firewall so that I can operate with it on....will let you know on that.
It's definitely the firewall
I have been having the same problem for a year or two now and I finally found this thread. If I turn my firewall (ZoneAlarm) off, and then log out and log back in as an administrator user I don't get the error messages but when my firewall is turned on it seems like Drupal can't recognize me and I get a bunch of error messages in the logs (anonymous denied access) even though it is actually allowing me to access the pages that it says it is denying access to. Does anyone know why this is happening? I don't think that disabling my firewall is really a viable solution.
has this been resolved for you?
I have the exact same problem which has started this week. I log in as an admin user, go to administer > access control, hit Save Preferences and then I get logged out, the changes aren't saved, and when I log back in and look at the logs I see:
Date Saturday, February 11, 2006 - 2:34pm
User Anonymous
Location /admin/access
Message admin/access denied access.
Severity warning
I'm not 'Anonymous'...
same problem in devel
I'm having the same problem. A week ago I had no trouble accessing my site. I have devel installed. It would change back and forth between having administrator privileges between my 2 administrators. (first admin1 would have it, then admin2 would have it.) Then I installed organic groups. Now no admin can see administer on the menu. If I go manually via the url get logged in. I log back in but I'm not at the admin url any more. problem seems to be module interaction with organic groups.
RESOLVED THRU HACK: editing devel in mysql tables only meant no one could log in. finally solved by editing devel.module line 57 to make default user id = 1 (admin) instead of null. then disabled devel. have reported this as an issue under devel.
..had the same problem - and
..had the same problem - and was also using google adsense code which hard coded into the layout - so hiding the google block was not the only thing to do.. for everybody with the same problem: using a little bit of PHP you can easiely find out which directory you're in - if using search engine friendly urls - and then basically hide the google add code - or whatever you like..
..anyways - this is what I did - and it made the 'anonymous access error' messages disappear from the administer-page:
// first we split the current QUERY_STRING into two pieces: everything before the'=' and everything behind the '='. That's necessary because even with clean urls on the QUERY_STRING contains the 'q=directory/subdirectory'..
$url = explode("=",$_SERVER['QUERY_STRING']);
// we're interested in everything behind the '='.. - ..so we'll grab the second part which should be found inside $url[1]..
$url = $url[1];
// then we split the url again into handy pieces and put them again into $url (recycling variables is not a crime - or is it..?)
$url = explode("/",$url);
// the first bit will contain the top directory:
$dir = $url[0];
// if needed the second part will contain the subdirectory:
$subdir = $url[1];
// then we start hiding whatever we want to hide - or actually we only show things if we're not in the admin directory:
if($dir!="admin") {
google-code-goes-here
}
..for me it seems to work fine.. - should also work without clean urls turned on - but i didnt test that.. - ..hope it's helpful for anyone..?
greetz, till..
Same problem here
I'm working locally for now, but I've been getting access denied too.
I have two users that I created: administrator (with all permissions) and another (with limited access content, etc. permissions). I'm using the ATCK theme for the site and garland for the admin area. Once I got the bulk of the site functioning, I took a break to style the ATCK theme with CSS and now I'm trying to log back into admin to make internal changes. I didn't make the admin navigation display on the ATCK theme because when I'm logged in, it uses garland, but now in order to login I have to manually go to localhost/admin.
However, the second I hit login, it shoots me back to localhost/?destination=admin which is just the site with all the ATCK theming I've done. If I try to access localhost/admin/settings or any other location manually, I get the garland theme, but access denied.
It's like it doesnt actually login.
Anyone know how I can get back into admin?
solved a similar Problem: could not change blocks
Suddenly I could no longer modify the blocks, I got this error (access denied, and this for admin!).
But I found the reason: all themes where deactivated (don't know why) and as soon as I activated them again, I could also change the blocks again.
Perhaps this helps someone....
Thanx!
Thanx, I had the same problem and also found out that themes had been deactivated.
After activating the themes it worked again.
P.R.
Admin denied access to admin
Having this same problem, on a major project.
Months of development and now we're locked out.
The error log shows the admin as user 0.
Any help would be greatly appreciated!
Thanks,
-Eric
The admin user can never be
The admin user can never be 0-- the anonymous user is always zero (regardless of what the username is). What happens when you try to navigate to http://site.com/user/1 ?
===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime." -- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz
Right, but...
Right, it's just that the user logs are showing access denied for user 0, so it's seems as if drupal is getting the admin account confused with user 0.
The user/1 page looks fine.
Thanks,
-Eric
Then take a look at the
Then take a look at the users table in the db (using phpmyadmin or something similar)--- it seems like the superuser and/or anonymous user got renamed or garbled somehow.
===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime." -- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz
user table
Yeah, we looked at that right away, seems fine. user 0 values all default to 0. User 1 is admin.
Thanks.
hmmm.... you probably tried
hmmm.... you probably tried this too but what about clearing the cache and/or sessions table?
===
"Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime." -- Lao Tzu
"God helps those who help themselves." -- Benjamin Franklin
"Search is your best friend." -- Worldfallz
Accessed Denied For Administrator - User1
I just ran into this same problem again tonight. Upon checking mysite.org/admin/build/themes/select and found that while my theme was set to default it was no longer checked as enabled. Upon clicking the enable theme check box, the error messages disappeared.
Bottom line, problem dealt with though I sure would like to know why that solution worked, and how the theme was un-enabled. This is actually not the first I time I have seen this happen, I am currently running drupal 6.5, though I believe I have seen this problem since 6.3 atleast with a wide variety of themes. Any ideas?
Access denied while trying to save blocks
I have the same problem when trying to save blocks. If I look in admin menu I can't see any themes listed. So I look in the themes list and my default theme has been disabled since updating the Drupal core from 6.5 to 6.6.
This has happened before, usually after updating the Drupal core. If I enable the theme again, I no longer get the access denied message.
Has anyone submitted this as an issue? It's been happening since 6.3 was released...
Bingo! Checking the
Bingo! Checking the "Enabled" box fixed it. Thanks. My DB got corrupted by a bug in the trace module and this was one of the victims.