You are here

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

I installed Drupal 4.5.2. I have done everything, i created the first user succesfully.
But whenever I log on or even just go to the home page it gives me a page that says "Access denied",
"you are not authorized to access this page".

I've checked everything I can think of...

I have read all threads, but i haven't found the correct solution for this problem..

Comments

I am getting this too. Am very confused as I have set up various test drupal sites (4.6.3) before successfully - now for the real deal (4.6.6) and I've fallen at the first hurdle.

The fresh drupal installation is creating the first and subsequent accounts, emailing me their details, rejecting false log-ins, but if the correct log-in details are used all you get is the access denied content page and no change to the log-in block.

I have tried standard troubleshooting - fresh install, fresh database, searched server logs. For what its worth, I started then aborted the process in the https space, and am on a Plesk 7.5.4 virtual host. I didn't have these problems before on the same physical server but with an earlier

Any ideas most appreciated. I didn't anticipate this, and my two days allocated to set it up are now crumbling away... grrr!

Install went fine. Created the first user, which was added to MySQL, and I got an email with the password. But when I try to login with it I get "Access denied. You are not authorized to access this page."

I permitted all drupal directories and subdirectories "Full control" to the web user (IUSR_WWW). The MySQL user I created for drupal has "ALL PRIVILEGES."

It works in my case, and it might work in your case too. Try it. If you are using multiple domains to point to the same domain, and if you try to access an administrator / a registered user account with multiple domains, this kind of problem is a regular one (chronic?). I learned to live with it. A better way to avoid "ACCESS DENIED" or "logged in but you are not really allowed to have access as a registered user" problems is to be consistent with the same domain/ URL. The problem is visible when you use two settings.php to point to the same database-based domains. It would be better not to share the same dB e.g. MySQL. Its not only the problem at Drupal CMS, it is also a problem with Joomla CMS. At this moment, 2nd or other domains can be reserved for only visitors use, and it would better not to use multiple domains to access contents as an administrator or a registered user. There seems to be something wrong with CACHE/COOKIE/TEMP files, and its all based on my personal experiences. I might be wrong. Someone can enlighten me.

Learning is a never ending process. As I learn more and more about Drupal or Joomla CMS, entropy of my knowledge on these CMS also increases.

GyaNeX
P.S. Someone should be working on Drupal to turn it also as a CMS for handheld mobile equipments.

The 'Access Denied' message even after you login correctly is a consistent problem at Drupal 4.7.x and 5.x.x. In the previous posting above, I have already given a dumb solution to an 'Access Denied' problem that you might face immediately after you create a new user account.

Today, I have a good news to some of you who are facing similar message 'Access Denied' when you try to do something at Drupal CMS and suddenly you see 'Access Denied' message, or when you go somewhere while in login mode for a short time (a few minutes to hours) and return to your computer, then you try to do something (whether as a user or as an admin), suddenly you find that the website does not let you work as the registered user (i.e. as 'log in' mode). In my case, it often happens (my finding) because multiple websites (multiple domain names) are pointed to the same copy of Drupal CMS or database (I don't know because of which one).

For example, if I am logged in to my website (e.g. http://www.geotechnical.org/ ) as 'administrator', and if I close Internet Explorer's current session, and come back later as a new session or in the same session (but after some time of inactivity), and try to click on a url at the same database based website via another domain name e.g. http://www.Geotech.Info/ , then my computer will show 'Access Denied' message. In the same way, after closing the session if I try to comeback to my website using second domain name, (while my log in session from first website is still alive/active), then it will ask me to log in to the website: second domain name based log in page. Here is a problem. IF I log in, it may show 'Access Denied' message, and I can not go back to previous domain based pages: access is denied via both websites. Even before logging in to the second domain, if you try to return to your primary domain to do something as a registered user, then you will face this kind of problem. This is what I noticed today. Then, instead of logging into second one, I tried to log in to first one, and it worked very well.

So, one of the solution that I found in my case of multiple domain is that the CMS via cookie / IE session, allows only the very first URL related domain in each session to get access to your website. Second one and on wards will not be allowed to access, even if you log out from the first one. I am not sure but it is the thing that happens around me.

Well, in my other computers connecting internet via LAN cable or dial up connection, this problem does not exist. Why? Don't ask me. Even if I use multiple domains randomly it has no problem. But, in WiFi based computer (my newest computer ? it has CA firewall, and is it a problem maker?), this is a problem that I always face (I am not sure whether the root cause is: WiFi, or FireWall, or computer maker or Windows version or IE set up or TCP/IP set up ?). Whenever I faced such problem, I could not log in for several hours, and my freetime is sometime completely ruined when I want to do something on my website. I hope today's findings will end my frustrations corresponding to this particular problem. Anyway, try using only one (the first one in each new session) domain name instead of using multiple domains. If not, remember which one is the first domain that you clicked when you started the current IE session. Try to go back to the first domain (among your domains) in current session.

Good Luck. If this method works, please post it here for other's benefit.

Immediately after I posted above post, I returned to my website via second domain, and I got access denied message to both domain based URLs. Then, I identified (from my fading memory), and logged in to my website without going through hit and trial, it worked. So, if the problem happens in your multiple domain based website, then this solution might work (it does not matter whether you have single copy of Drupal CMs or multiple, because in my recent problem it happened with two domains connected to two separate copies of Drupal CMS, and these two copies have separte MySQL database account. I am not sure it might be because of unique IP address of my website hosting server, and the conflicting information in these two domain related cookies saved on my local computer here. It is all my layman (if elseif else like in 3 blind men's experience on a giant elephant) kind of guesses.

I try to install it on
RHES3 with
xampp (mysql 5 -- php4 or 5 -- apache2 )

and on another server RHES3 with
apache 2
mysql 3.23.58
php 4.3

Still the same problem, i've been able to create the first admin user but can't get in ? Access Denied -- You are not authorized to access this page.
I try changeing the password as well and nothing better.

"access content" under node module supersedes all other access?
I did not have this checked but had "access pages" and "access views" checked under panels. I kept getting the "access deined" message.

I thought that if I had "access pages" and "access views" checked under panels, then that meant that the user with the corresponding role would have access to the panels. That is wrong.

Thanks Chris

http://SocialNicheGuru.com
Delivering inSITE(TM), we empower you to deliver the right product and the right message to the right NICHE at the right time across all product, marketing, and sales channels.

I have exactly the same problem.
I installed drupal on a free host provider space, and it worked smoothly.
I tried to install it locally on my computer ang got this access denied just after the creation of the first user.
The mysql installation works correctly (mysql returns a message indicating that the sql operations was successful), and every table seems to be there.
I tried to execute the sql statements above (one by one) and each one produced a 'duplicate entry' , so it seems the table are there and well feed... But the problem is also still there.
I tried t reinstall all twice to the same result...
If anyone has any idea worth sharing, thanks in advance for your answer !

I upgraded from 4.7.4 to 4.7.6 and all users except admin users were not able to view the content. Applying your fix to the database works. But I am confused.

I checked those tables before the upgrade and those entries (the second and third) are not there. The first one is - in the users table.

After the upgrade, the entries are still not there -except for the first.

So to me this says that those entries in the database did not change ... but are needed after the upgrade. I was wondering what access rights I just gave by executing:
INSERT INTO users_roles (uid, rid) VALUES (0, 1);
INSERT INTO node_access VALUES (0, 0, 'all', 1, 0, 0);
after the upgrade, and why, if needed and if you know, does the upgrade not apply that change.

I opened my drupal site but I could not view any page.When I open a page then "Access Denied" page is displayed which says "You are not authorized to access this page".In addition I could not even view the admin login page.when I login as admin then the same thing happens.I have executed the queries
INSERT INTO users_roles (uid, rid) VALUES (0, 1);
INSERT INTO node_access VALUES (0, 0, 'all', 1, 0, 0);
1st query is executed and 2nd query is giving duplicate result.So my problem is not solved.Plz help me out

I have tried to install drupal 5.6. The installation works fine but once I create the super admin user and change the password or log out I can't seem to ever log back in again with the super user. I tried your sql script above had success with middle users_roles script but this did not fix the probelems of my user not being able to login again. it just seems the the whole session is lost or something???

I have searched the forum loads, no one has said anything of how to handle this problem etc. I have installed my drupal in a sub directory of my site not sure if this makes a difference ..... can any one help ?

* 'databasename' is the name of your database
* 'username@localhost' is the username of your MySQL account
* 'password' is the password required for that username

-------------------------------------------------------------------------
If problem is still exist , You have to try editing file "settings.php" (Drupal\sites\default\settings.php)
at the line
$db_url = 'mysql://username:password@localhost/databasename';
change mysql to mysqli
$db_url = 'mysqli://username:password@localhost/databasename';

Before using mysqli, make sure you have the line 'extension=php_mysqli.dll' in file "php.ini"
and you should have files "php_mysqli.dll" and "libmysqli.dll" in php directory.

the 'access denied' message in question here pertains to drupal access permissions. The solution you're suggesting relates to a problem with the site being able to connect to the database, in which case, all users would see a drupal error page, not an access denied page.

if you're seeing 'access denied' for a specific node, you *are* connecting to mysql, and that's not your problem.

I seem to have the same problem plus an added error message. Details below
Has anyone solved this yet? Help

I am on the welcome page and am trying to create an administrator account but it says access denied. This is the first time I have been here. If I go to the administer page it tells me the most recent system events, which are:

I posted farther below about why this is happening... but I was chasing my tail... "forest for the trees" syndrome :-)

The solution suggested about using the mysql vs. mysqli DLL's is bang on! 100% correct!

Why is a database driver for PHP causing permission problems in Drupal? The SQL being run against MySQL is causing the $user->uid (the unique ID assigned to the very first user) to be reset to zero or NULL when a read is done. Then, when the sessions table is updated a bit later in the code, the correct uid in the table (that would be "1") is overwritten with zero -- ehhh -- that would be the same uid as anonymous !! Ouch.

So then when you click anywhere, your browser sends the session context to Drupal. Drupal reads it from the corrupt sessions table and sees that you seem to be uid = 0. So in the Drupal code it takes a nasty turn for code meant to keep pesky anonymous users out.

So what I did is:
- switch from mysql _TO_ mysqli.dll by copying the new DLL from \php\ext to \php (make sure \php is in your PATH for Windows)
- modifying the php.ini
- modifying the settings.php config file

I think the problem is that the mysqli (as opposed to the mysql) is for versions of mysql >= 4.1. There must have been some significant change in this version. In the PHP installer you can change and add "MySqli" (and make sure you change the path as above). I don't think you have to change the privileges, I think the problem is MySql with versions >= 4.1. I have version 5.0 of MySql installed and you have to change sql-mode to (i.e. search in the my.ini in MySql):

sql-mode="MYSQL40"

To make it backwards compatible with 4.0 (note not 5.0 to 4.1, which is also incompatible).

Wow. I have tried everything! On my local computer running 474 and 5b2 side by side, I would get the login issue every time in 474. I tried the patch fix, and could not apply it, tried the sql fixes but they were unsuccessful. I tried the mysqli switch and it worked.

Sooo, I can turn the problem on and off by switching back and forth in my settings file from mysqli to mysql. Would anyone like me to try anything specific? It would appear that the person who said it could not be a database access problem, was not quite right. This appears to be a problem with many red herrings or it is multiple porblems showing same symptoms.

Drupal packages tend to have the config.php file permissions set to unwriteable. When you register your admin account you need the config.php to be writeable. Just chmod it to 777 for the install and first account set up and then chmod it back to what it was afterwards.

It's most likely that you are being denied access because your config.php file won't let your main admin info be saved.

At first I tried installing Drupal 4.7 and Drupal 5.0 Beta, with the database connection settings as 'sql' and not 'sqli'

Everything was going good, Drupal was connecting to the database with both versions and it created the appropriate admin account. But as soon as I tried to change the password, or clicked the 'submit' button it would immediately go to a "YOU ARE NOT AUTHORIZED TO VIEW THIS PAGE." error.
I could click on the menu link (one at a time) and would have to enter in the username and password, but the password was the one that drupal initially assigned, NOT THE ONE THAT I HAD CREATED.

Resolutions:
For Drupal 4.7:
When you have to go into the settings.php file to put in the username, password, and database, change the 'sql' to 'sqli' . Before doing this I started out with a completely new database. It worked like a charm.

For Drupal 5:
When it asked for the type of database choose 'sqli'. Works perfectly now.

downloaded that session.inc over the current includes/sessions.inc file and everything started working again, now I am just getting an error in the Status Report about GD library for PHP is missing, but thats an unrelated problem and drupal is nice enough to even give me a link to the download of the GD library, so I just need to install that real quick and everything will be great.

I know this thread is ancient. But I wanted to post a little info in case somebody else has the same problem.

One of my sites is very conservative - no public posting and they're happy. So, I've left them on Drupal 4.7.

Recently site5 did some system upgrades. Likely that caused this site that was working to stop working for authenticated users. It was fine for all the guests. But if you tried to login, one click and "Access Denied"

I won't list out all the steps I tried that didn't work. After a lot of trial and error it looked like my UID in the sessions table was getting set to 0 as described above. I took a 4.11 sessions.inc file and used it to overwrite my 4.7 sessions.inc file.

I can now login and do things just fine. I may now invest a little time to upgrade this client though - the rest of the world is not going to stand still...

warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/style.css) is not within the allowed path(s): (/home:/tmp) in /home/quasar/includes/theme.inc on line 64.
warning: Cannot modify header information - headers already sent by (output started at /home/quasar/includes/common.inc:348) in /home/quasar/includes/common.inc on line 190.

Thats the message I get with the Access Denied thing. I have not even been able to login, so this is still while installing Drupal, and I'm installing on a free hosting site. Anyone know what I can do to fix it?

Mine's not an install problem as I have 2 sites running 4.7.4 that have been installed for several months. It is only just now that I am seeing "Access Denied" messages when logging in. Only for authenticated users. And these are FreeBSD boxes.

The web host says there have been no changes so it is very bizarre. I am guessing at a config change on their web server. Would I be right?

I am also at 4.7.4 and the suggested change eliminated my "access denied" problems. It was also due to an webhost upgrade from PHP 4 to 5. The session.inc file is located in the includes directory. Just make the one line change as Swifty suggests and the problem goes away. Thanks Swifty.

Folks,
I have a 4.6 running site which has been problem free for around 9 months. Ater following several other posts, confirming users, user_roles and node_access are set up for anony access, I have a user 0, I swapped the session.inc to see if that would help. In fact, that was what allowed anonymous users to access the site again, but somehow, no longer creates the cookie for the users that try to log in. Now everyone is anonymous, including admin. While this makes the more accessible, it prevents me from posting anything, or my user population. I added the additional line to the include file:
register_shutdown_function('session_write_close');

I also have a site running 4.6. For me, all I had to do was add the line:register_shutdown_function('session_write_close');
immediately after:

function sess_read($key) { global $user;

in sessions.inc. It sounded from your comment like you replaced the entire sessions.inc file with another one, and if so, it's likely you overwrote it with one for another branch of Drupal (like 4.7.x). Simply adding that one line, and doing nothing else, fixed it for me in 4.6.

I know there are two issues discussed in this thread. The one I refer to is where you login and the system seems to log you out when clicking around on your Drupal site. This is because the type of user you are known to be is dynamically changed in the session table from X to zero. Zero, to Drupal, means anonymous and presto...you seem logged out.

I have 4.7.4 Drupal installation that has admin login but doesn't allow to do admin actions. I have to login every time I see (Access denied ) message, get to the next page but my actions are not saved. Please help.

i'm was already preparing to move from 4.7.3 to 4.7.4 when the issue surfaced. now I can't follow the steps in preparing the site for upgrade because I keep access denied pages. How to I do work around this problem?

I get the access denied message when I click on a button even though updates or whatever are actually completed in the background. Simply refreshing the page then returns the updated page.

First thing I did, right at the beginning, was to trace back on access_denied(), echoed some __LINE__ calls in what might have been relevant other functions, and the echo in menu.inc, menu_get_active_item() "fixed" the problem. Apparently defeating the header function by sending something before it allowed the registered user to be revalidated and there was no access denied message. I knew it was a dirty "fix" but I just echoed a new line in menu_get_active_item(), and for some reason everything worked fine on my local machine. Not surprisingly, it totally breaks on my remote machine, however.

When I looked into swebmaster's post, I found that session_regenerate_id(); is already in user.module of 5.1. I tried putting the $GLOBALS['tempUser'] = $user; in index.php, anyway. That didn't work except when I put it above the drupal_bootstrap function...but again, that's only because it outputs an error before headers are sent, and just a new line does the same thing--somehow works on my local machine but not remotely.

Anyway, I'm not sure how to resolve this, and any suggestions will be appreciated.

hey folks
am still in the setting process trying to figure out a way to set up drupal .
however i edited the settings.php file and i tried to access my site and it gave me several errors and i have no idea what that means since im not an expert in linux. so is anyone available to help?

I may not be the best person to help, but it looks to me like drupal is either not finding your db or your db is not set up properly (missing tables). The first option is to check your settings.php file, and make sure you have correctly entered the db information. If you need more help, you will need to give more specific regarding your site set-up, structure, etc.

I am getting an access denied after I log in as admin on my site. I log in and go to my account page which I set as front, but then when I try to click to any other page, it gives me access denied. It did this once a few weeks ago and self corrected, and now its doing it again. Same result in IE and Opera as I received in Firefox. I haven't changed or installed anything in the past week so I'm not sure why it would now be doing this.

I'm running Drupal 5.1 and I'm getting the 'Access denied' even when I logged in as Admin. The nodes show up show up (minus a flash file I placed in the template), but it's preceded by "access denied. The strange thing is that if I activate a panel in the main content area using the panels module the "access denied" banner disappears, and a placed flash file that I have in the template shows up and everything is perfectly normal. Why would panels suddenly remove the "access denied" banner? And what causes ut?

I ran into the access denied issue too, after spending a fair bit of time creating menus, adding pages and logging in and out as separate users. It's probably a limitation in the cookie handling or similar - after I clear private data in Firefox, the error disappeared and menus were accessible as they were supposed to be.

Cheers tp! Your suggestion seems to have fixed my problem. Migrating my client's Drupal site from a remote Plesk virtual server to a local MAMP server has proved to be quite a pain in the behind. Besides the Access Denied problem I also had occurrences of this, this and this!

I also noticed same issue, but it wasn't related with session was an real-access problem.

If you have been playing with some different access modules (organic_groups, simple access, taxonomy_access...) your node_access table could be a mess.

If you decide to upgrade, all this mess will come up and you won't be able to login from your login block (although you will be able to go in with at /user), and at the same time, anonymous or logged in users will get an annoying "Access denied" page.

The solution in this case don't need a patch. As was said before, you just need to clean up your node table.

If you don't mind to lose some information, you can run this query:

DELETE FROM `node_access`;#Or run any of those if you know the offender:#DELETE FROM `node_access` WHERE `realm` = 'simple_access';#DELETE FROM `node_access` WHERE `realm` = 'og_all';#DELETE FROM `node_access` WHERE `realm` = 'og_public';#DELETE FROM `node_access` WHERE `realm` = 'node_privacy_byrole_role';#DELETE FROM `node_access` WHERE `realm` = 'node_privacy_byrole_user';#DELETE FROM `node_access` WHERE `realm` = 'og_subscriberog_all';

I got this very same problem after my provider changed character set and collation on some tables in the database (they were trying to "fix" corrupted rendering of non-western characters by playing around with the character encoding of the tables, changing latin1 to utf8_swedish).
After runningALTER TABLE tablename CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;

i am having the same access denied problem, but mine is different because I can access everything through my admin account, but I have set up other authorised accounts, and they cannot access forums, events, or pretty much any content that has been uploaded from the admin account!
I have enabled access to these content types in administer>user management>access control so i dont know what else i can do!?

Hey...think this would work(Iam running site o drupal 5.7,other versions need to be tested)

1.Go to post settings under content management and you will rebuild using the option "Rebuild permissions" under "node access status" and the option is well explained there as given under...

"If the site is experiencing problems with permissions to content, you may have to rebuild the permissions cache. Possible causes for permission problems are disabling modules or configuration changes to permissions. Rebuilding will remove all privileges to posts, and replace them with permissions based on the current modules and settings......"

But from other posts here i found some users cant find the rebuild permissions option in the post settings page.I dont know how,but it is true.Even me after clicking on Rebuild permissions(which was luckily there) the access denied error was removed.But,when i returned to post settings page the 'Rebuild permissions' option could not be found where it was!

I'm still searching for a clean solution before digging around in SQL.... this one, (rebuild perms) didnt work for me. My problem might be different in that a registered user can access any content that is marked as "new" but old content it gets access denied.

I've just spent a day trying every method posted here to solve this strange problem.... been running drupal 5.3 based site on local machine fine, then uploaded to our dedicated redhat linux server.

I could login as admin user (uid 1) fine, but clicking on the 'administer' link or trying to visit www.mysite.com/admin/ brought up a server error page. I could access certian parts of admin such as www.mysite.com/admin/build/ but clicking 'save configuration' on many areas of admin caused error page to be displayed.

After spending the day searching the entire site for clues - thinking it was perhaps a permission, session, .htaccess problem i've discovered that it was a Memory Problem to cure it I increased the amount of memory allocated to PHP using the following line in my .htaccess file

php_value memory_limit 40M

I hope this helps someone out there - its been a very frustrating day!

yea i think drupal has way too many things working in the background that produces such weirdness, combined with module developers who haven't quite gotten the grasp of how drupal works. I hope it becomes more stable with the next release.

creating other users (in this case the system does nothing when signing in)

In my case, the thing I did was change the drupal directory one level up on my public local directory tree, passing from http://localhost/htdocs/drupal to http://localhost/htdocs. Since I did this, I receive the Access denied error over and over again after submitting the first user data, no matter if i change the database and reinstall Drupal or if I do any of the operations listed above.

i've been trying to lick a similar problem on one of my sites (Drupal 5.6/PHP 5.2.5/MySQL 4.1.21), and have lost sleep and sanity doing so. the symptom is (seemingly) random access denied errors which trip every now and again, even when refreshing the same page. not always, just enough to ruin the integrity of the site. i've gone through most of the solutions that have been posited in this and other "access denied" threads, and the issue persists.

investigation led me to the $user object, which would be fully instantiated when a given page was functioning properly, and empty when an error occurred. figuring that there were sessioning issues, i compared the session variables in both cases via php_info() to see if i could spot any differences, thinking that perhaps the session cookie domain was off or something.

turns out that the only difference was the session.save_handler, which registered 'user' (drupal's required handler) normally and 'files' (the php.ini default) during failure (to investigate, try printing ini_get('session.save_handler') in your page template). bizarre, considering that the session.save_handler is explicitly set to 'user' in settings.php.

i have no access to change the default setting in php.ini, though changing the default save handler can introduce other problems in some php configurations anyway. i've tried changing it in .htaccess, but to no avail.

still looking. this may be something, or a complete red herring. anyone's thoughts would be welcome.

I've reinstalled the Apache HTTP Server plus PHP and MySQL, now installing the parts separately (I used to use Anaska WAMP server), after having cleaned the temporary files and cookies with CCleaner. The problem seems fixed.

phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in config.inc.php and make sure that they correspond to the information given by the administrator of the MySQL server.
Error

I have the same problem (although I expect these issues to have several distinct causes). Nothing but an "Access denied" screen smiled at me after the database wizard finished. All hints posted previously in this thread didn't help.

Drupals index.php returns MENU_ACCESS_DENIED from menu_execute_active_handler(), followed by a call to drupal_access_denied().

Hi, Im having the same problem "Access Denied", its nothing to do with database access (because drupal works) and its not a problem when logged in as admin.

I get "Access Denied" when I am not logged in and I know why although not the solutions. I have noticed that only recently the "NODE_ACCESS" table in the database is no longer being updated. I do not have any node access modules installed however I did have the workflow installed and now removed.

The following is a list of things I have and have done...see if anyone can match mine against theirs...

Original install drupal 5.2 moved from local server to remote
created another user group including one called "superuser" (maybe a problem???)
removed workflow although not the database tables
CCK modules installed,Multilanguage i18n,HTMLarea,Menu trim,Views

First, I tried DRUPAL on my local network (with Zend Core) and worked so well. Then i decided to set it up on my remote host.
Problems occur right after that. First i bought a new hosting from Networksolutions and then configure a php.ini for turn off "register_globals". Installation has past ok.

Using admin account i tried to open some modules but "taa taaaa" here i got the first bug: "Access Denied"
And then i tried every way to fix problem but no solutions yet.

When i look back and observe my local network (where is the DRUPAL runs so well), there's only one possibilty to have "access denied" rror: It's bcs of "PHP CONFIGURATION". That's the only difference between my local network and remote host.

I just upgraded from 4.7 to 5.7 and having a weird issue... I'm getting "Access denied" only on two admin pages:
admin/user/access and admin/user/roles
I dont even have them in admin/user menu but can only access it from modules menu (?). Other pages in User management are ok like admin/user/settings, admin/user/user and so on.
As far as I noticed, upgrade went fine without any errors. Does anyone have an idea what can cause this?

I tried cleaning browser cache, cookies and what not...any help will be greatly appreciated.

I can't figure this out. Whatever the problem is, it seems drupal should give a better error message. I am clearly logged in (and as the admin user--the only user!) but can't get to the admin pages or my own user page.

In my case, the problem is only on my local development copy--an exact snapshot of what I have running on the live server except for a different database specified in settings.php.

I have a different kind of problem. I have been running a Drupal 6 site for months with no problems. Then, all of a sudden, select users are reporting "access denied" error while others and myself, the admin have no trouble. As far as I know, no one changed any settings. They have tried deleting stuff from their browser, etc., Does anyone know what this might be about?

Mine is a very strange case indeed . I can access all pages and views as an administrator , but when I log in as authenticated user I get "Access Denied You are not authorized to access this page." for some nodes (especially pages) and some views such as audio and video just show a blank page. I have changed all permissions to give unrestricted access to all groups but nothing changes.

Hi, I have a similar problem with video pages. When I grant authenticated users admin priviliges they can access video pages, but when I take them theses privileges away ( access content still active), they can`t access the video nodes anymore ( "access denied ..."). Now I tried all methods in this thread, but still have no luck : ( . The strange thing is that I have 2 video nodes that are working properly ( authenticated users can access them ). But when I create new video nodes described problem appears. Could it be something with the video nodes ( openPackage btw )?

I just upgraded to 6.2 today (from 6.1) and then all of a sudden all my Pages are giving me "Access denied: You are not authorized to access this page." on ALL accounts. Normally, even anonymous users have access to all pages. Checked all my permissions, nothing changed there. Any other ideas?

I'm new to CMS-type systems & recently installed Drupal v6.2 on my computer to try it out using apache2triad, per a suggestion in the Drupal Documentation section.

I get the "Access denied, you are not authorized to access this page" message in the css_injector module when I click on the "create a rule" link.

I have no trouble accessing any of the other modules, including other contributed modules, so I don't understand why this one acts up. I know zip about how to change write permissions, chmods or node accesses, so I haven't done anything except basic install.

One thing I noticed is that the v6.2 readme documentation says the drupal-6.2/modules folder is only for core modules and to put all contributed modules (such as css_injector) into the sites/all/modules folder. But when I put contributed modules into the sites/all/modules folder, they do not show up on my Administer >> site building >> modules page. When I put contributed modules into the drupal-6.2/modules folder, they show up on the site building/modules page so that I can check them to enable them. ... Does the module location affect access permission?

Does anyone know why this is module-specific "access denied" is happening & what to do about it?

Hey...think this would work(Iam running site o drupal 5.7,other versions need to be tested)

1.Go to post settings under content management and you will rebuild using the option "Rebuild permissions" under "node access status" and the option is well explained there as given under...

"If the site is experiencing problems with permissions to content, you may have to rebuild the permissions cache. Possible causes for permission problems are disabling modules or configuration changes to permissions. Rebuilding will remove all privileges to posts, and replace them with permissions based on the current modules and settings......"

But from other posts here i found some users cant find the rebuild permissions option in the post settings page.I dont know how,but it is true.Even me after clicking on Rebuild permissions(which was luckily there) the access denied error was removed.But,when i returned to post settings page the 'Rebuild permissions' option could not be found where it was!

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?

sorry. i'm using drupal 5 so no help there. i can't access anything it seems. it just spits me out to my ATCK theme with the path mysite/?destination=admin/content/etc.
Then if I ditch the ?destination=, I get back to my garland login page with an access denied message and it won't login even though i'm using an administrator role with full permissions. it's almost to the point where i think i may have to redo it, but i'm so far along, i'd rather not

I have spent several hours reading though most of all the comments here. I don't mean to be rude, but this is probably the worst tracking of a problem I have seen. The same solutions pops up +10 times. Can't you read? Clearing the cache and cookies didn't solve this issue. If it did this thread wound not be alive over 3½ years since the fist post!!

I can honestly say that I have tried ALL suggested solutions I found here. I still have the same problem. Why? First of all, is there a precise description of the problem? Well, strangely I didn't find any. Yes, I did find some comments describing the problem. But it seems every one is talking about a whole bunch of different problems. No one has found a good solution, because no one described the problem.

So let me describe the problem I experienced:
-I encountered this problem when I copied a live drupal site to my local machine for testing.
-All files and folders are a exact copy of the live site.
-I exported the database, and imported it on my local server.
-I made the necessary changes to let drupal make connection to the database on the "new" server.
-All pages work in the same way as on the drupal site. So the connection to the database works.
-When I log in I don't get to the userpage as usual. Instead I get the "Access Denied" page.
-The same happens for all users.
-If I type the wrong password I get a "wrong usernamn or password" message.

Am not here with a genius solution to your problem.YOu have reported the error in such detail and i dont want you to feel disappointed before you get a good solution to it.
But one thing I noticed in this thread is there are only few users persisting with their question.Think its because they got their error solved some way or the other.Or may be spontaneously that they didnt want to come back here and report the solution.

Also different solutions have worked for many.You may try your luvk here...doing things with your test site a while and see if the error disappears.

Well... the thing is that I did just that ... test the solutions posted in many of these comments. It didn't help. If it would I'd never post anything about this. I always try look for some solution to my problems on the forums. But no luck this time.

The worst thing is that all I can do is modifying the files and the database. Both methods are just for extreme cases. But because I can not log in at all I can't access any settings through the menus. Not even through direct urls, as some one suggested earlier.

This is what makes it such a serious issue. If there isn't a solution for it I will not be able to move a drupal site from one server to another.

Didn't you read what I said? I have tried all kinds of solutions posted here, and because NONE of them solved the problem I asked for a DIFFERENT solution.

Php4 is dying and a direct consequence is that hosting providers all over the world upgrade their systems. That makes this issue quite interesting because it can affect almost every drupal site that is still running on php4.

So, I'll ask again, is there any one out there with another solution to this problem?

I was experiencing the dreaded 'Access Denied' error only on ONE particular page (/blog). In order to fix this I tried a number of different approaches based on information I saw on the web. I changed permissions, cleared cache, changed my httpd.conf file, changed my .htaccess file and no luck. What was it?? I actually had a node already created that had a 'blog' url_alias. I had to delete the old node url_alias and then BINGO, all was fine.

To find the record run a query like: SELECT * FROM url_alias where dst like '%yourpage%'
Then run a delete on that row or change the dst value.

Hopefully this will save some of you some time, it took me a while to figure out.

I ran into this problem after I added a switch in my settings.php file for the database so that I could easily switch between my local and live databases without having to edit settings.php over and over again.

I am the same issue on a iMac. I am running Drupal 6.6 on Leopard using MMAP running PHP 5.2.6 w/ MySQL client version 5.0.41. I tried to edit the settings.php file as it was suggested above but for whatever reason, I couldn't get the permissions to stick so the changes would be permanent. When I am logged in as an admin, I can see, change and view all the web pages that I've created or changed, however, the moment I log out, I start getting that dammed "Access Denied, You are not authorized to access this page" crap. I seem to be having the reverse problem of what others are dealing with. Any how, if anyone has any ideas, please let me know as I am stumped at this point, thxs.

dsanif

PS,

I was able to finally edit the settings.php file, but it didn't work for me in resolving my problem.

I am currently looking at a duo-core pc\ production server to transfer my site to although I'm not sure as to how hard it will be to transfer a drupal site created on a mac to a pc. In the meanwhile, since I'm using the free version of MMAP, where would I go look to inside it to see if it in fact has changed my permissions settings on my web site files? Again, the strange thing is that as admin, when I'm logged in, I can see and access everything, but when I logout and try to view the site as a plain ole' outside-looking-in user, I get the "access denied" crap. Just don't know what the heck I did to screw things up. Thxs.

setting '$cookie_domain = 'example.com';' in settings.php to the wrong domain also generates this access denied error. For example if you wrote '$cookie_domain = 'exmaple.com';', on the domain example.com you'll get the access denied on all pages.

I've been working on a big drupal site which I've had installed on my own server as a subdomain (so this might be client.example.com). I have just sent the site live and therefore moved the site files (and all assets) to a new folder on the same server (so it now also appears on www.client.com). No changes to the database were needed as the development site and live site are hosted on the same server.

The site looks fine, however when I go to log into the admin section on the www.client.com domain with any of the usernames and passwords I had set up I am getting the "Access denied You are not authorized to access this page." message. I can still login fine at client.example.com.

"you are not authorized to access this page", this is normally a permissions message. It happened to me once when I added new modules. I was the 'administrator' but for the extra functionality added by the new modules I had not yet given my self permission to manage them. For you though I think it is something different.

When you installed did you get all of the way through the installation process with the database connection made and to the home page? I have doubts.

Since you have not created any sites yet I would start over and make sure you get all of the way through the installation process without any error messages. If you get error messages and get stumped by them please post them here.

I am going through the same. I have an "edit profile" link with the correct URL. When I click on it as an admin or a normal user, I get the error message. I tried to change my permissions but to no avail. I saw that we could change stuff in phpadmin but my knowledge about it is limited at the moment. So, it would be great if someone could help me sort out the problem.
Thanks
T,

My situation was this:
- Installed the 'Acquia-Drupal' Drupal 6 complete package (web server, database, etc.) on my Mac last week
- No problems with any login at first - set up a site with several users etc.
- Exported site & database to live server, no problem
- Continued work on my local Mac copy today, could still log in as admin (and see my user page using localhost:8082/?q=user), but any other path produced the 'Access Denied' message (e.g. a path like localhost:8082/admin/).

I tried checking the database users & permissions, but that all seemed ok (according to the above comments), but finally I've found the solution. I uncommented the Rewrite Base in the .htaccess file in the root site folder, i.e. I changed the line:
# RewriteBase /
... to:
RewriteBase /
... then saved the file, refreshed the browser, and suddenly I could access localhost:8082/admin etc.

I don't fully understand why suddenly now I need to specify a Rewrite Base, but it's sorted out this access problem.

Note that since Apache .htaccess files only work on Linux and Mac OS, this probably won't be useful to Windows users with a similar problem.

to t.sivasubramanian .... look at your data base and eg in the table user ....and look at id 1 .... there you will find your user name ...if it is not admin he he ....edit the password by clicking edit type in a new password ...then go ...then edit and select md5 and then go ...you have now changed your password ...

BUT As for" Access denied You are not authorized to access this page."

look in your settings.php file and scroll down until you find '$cookie_domain' if it is not set to your domain name change it !
(i found out the hard way after a site move / clone )

I am having many many problems too. Problem is that I have a live site running and I am loosing customers every day. I got totally confused of what could happened, I am still thinking about 2 modules I might have installed but I removed them and the problem is still there. So now that I am reading your comment above about updating from 6.16 to 6.17 I started thinking I did that last week, and that is when I started having issues.

People will register and right after get an access denied page, or even some other were not able to log in. Some other users were able to log in after the second try, some did not had problems at all. Well I am talking in past but reading your comment I am positive, hopefully this will help me too, otherwise I am lost and I might need to re do another drupal installation or I have no idea actually. Thanks, I will reply as soon as I check that everything is running smoothly after 2 days.

* Ensure the $base_url in settings.php, if being used, is correct. Sometime when you get logged in from one site, the base url processing sends you to another version of the site (eg from dev, to staging, or production) where you are no longer logged in.
* Ensure cookies are enabled.
* Ensure that if you're using the $cookie_domain in settings.php, that it's setup correctly.
* Provide more information when you report issues, Eg, What's the URL of the page where you're getting redirected and getting 403 error after login?

I was also getting this error after creating content,
for solving it i googled for two days, as their was too many post of different solution for the same problem, but not a single one of them was working,
so i tryed to solve it by myself.

the solution is very simple, you just have to login by administrator and in modules check that their are no disabled items over their, you can make them enabled by clicking on them, specifically on node,locale,content Tranclation.

hi guys
im running dp6 and using audio module
everything on site works, except when i try to use the audio import module, this used to work before but suddenly recently it doesnt, when i try to import audio files i get You are not authorized to access this page.

iv checked all write permissions and everything seems fine, i jus dont get it

Node access status
If the site is experiencing problems with permissions to content, you may have to rebuild the permissions cache. Possible causes for permission problems are disabling modules or configuration changes to permissions. Rebuilding will remove all privileges to posts, and replace them with permissions based on the current modules and settings.
Rebuilding may take some time if there is a lot of content or complex permission settings. After rebuilding has completed posts will automatically use the new permissions.

There's a button directly below that text that solved all of our problems. : ) Cheers!

In future please create a new forum topic for your question. It's not related to this original post best I can tell.

Answer:
if you upload it to a server you view it on that server. If it's on localhost and you have the proper environment set up on your local machine you view it on that local machine. If you don't want to view it as an administrator. Logout and view it as an anonymous user.

If this does not answer your question please consider being more verbose in a new forum thread. Thanks.

If you have just found that your IP is banned, get a VPN account https://www.iwasel.com/en/ I was blocked, got the account.. connected with no degradation in speed... and was in business again! It's a great solution.

IN Drupal-7.x-dev version admin is login then admin is log out suddenly admin is access denied then next login time is not avalibile username and password then direct redirect main page without content of menu bar of home ,dashboard,content,structure,appearance,people,module,configuration,report,help plz give solution sir