WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] "You do not have sufficient permissions to access this page." (94 posts)

  1. ghacks
    Member
    Posted 8 years ago #

    i first thought it was a permission problem but the empty usermeta is the key.

    I edited the following entries to it and its working flawlessly now. This is only working if you have no users other than the admin, not sure how to add the users as well.

    Start Phpmyadmin
    Select wp_usermeta table
    Select INSERT
    leave all as is exept:

    user_id Value 1
    meta_key Value nickname
    meta_value admin

    SAVE

    Select INSERT
    leave all as is exept:
    user_id Value 1
    meta_key Value wp_user_level
    meta_value 10

    SAVE

    Select INSERT
    leave all as is exept:
    user_id Value 1
    meta_key Value wp_capabilities
    meta_value (look into wp_options table, select browse, row wp_user_roles, copy everything from values into meta_value)

    SAVE

    login, you can work with 2.0, no permission problem anymore

  2. Koztoujours
    Member
    Posted 8 years ago #

    Ghacks, you're the best ! It works ! Now, I have to figure out if I dare make the upgrade of my real blog or if I am definitely too sacry of loosing my datas... ;-)

  3. ghacks
    Member
    Posted 8 years ago #

    Koztoujours I tried it with one of my smaller blogs, only admin and only 4 posts :P

    I won´t try it on one of my big ones, to risky atm for me..

  4. Koztoujours
    Member
    Posted 8 years ago #

    Same as you : I did it on a small small blog...

  5. Koztoujours
    Member
    Posted 8 years ago #

    Sorry, but it seems that the problem occurs again...
    A little bit upsetting.

  6. toocan
    Member
    Posted 8 years ago #

    i presume people are having the same problem as me, so ill give a detailed run through maybee it will shed some light on whats happening...

    when i loaded the upgrade page ( upgrading from 1.5.1 ) i initially had a lot of errors (about 15 or so ) along the lines of :

    WordPress database error: [Table 'database.wp_usermeta' doesn't exist]

    so i ran the upgrade.php again and got no errors.

    the site front end works and i can login to the adminbut when i goto profile / logout / add post etc.etc. i get the 'you do not have sufficient permissions to access this page' and the top nav pane is missing.

    logging into the dbase i cannot see the wp_usermeta table so i presume this is why I and many others are having this problem....

    as a workaround maybee some kind person could post the raw SQL update script i can run on the database ?

  7. gthornock
    Member
    Posted 8 years ago #

    I ran into the same problem, fortunately in a test environment. In my case I was able to determine that the problem was caused by the security configuration I use.

    Normally, my wp-config.php database user is a limited user that doesn't have rights to create tables. I mistakenly ran the update.php script with that user still enabled, and apparently, while part of the script failed, part of the script succeeded. Thus, when I re-ran it with the "dba" user enabled, it didn't do everything it needed to do.

    I found a fix that worked, at least on my system, which was to drop the database, reload it from the just-before-upgrade backup and re-run the update.php script using the "dba" user.

    Hopefully: (1) I won't have the same problem on my live site, and (2) this information is useful, either to users with the same problem, or to someone trying to produce a general fix.

  8. Koztoujours
    Member
    Posted 8 years ago #

    I don't remeber whether I had my blog opened anywhere when I initiated the upgrade ... I will try the solution you give but it would be great if there could a safe upgrade process.

    To the support team : I know that week has certainly be harassing, but, please consider re-labelling this thread as NOT RESOLVED. This is a major problem as it prevents numerous would-be users from administrating their blog and it is NOT resolved. Thank you.

  9. Koztoujours
    Member
    Posted 8 years ago #

    Each morning, I come to this page, with the hope that during your turn to be awake, (you, in the US), an answer would have been given to this problem which impede me (and other wordpress users : eg http://www.wordpress-fr.net/support/viewtopic.php?pid=2520#p2520) from upgrading and using 2.0...

    I don't understand the silence of the team on that issue. My situation is not unique, the problem is quite a major one and it is clear that upgrading in such a case is out of question.

    This topic is labelle as resolved. If this is the case and I am too stupid to see the solution given, please be kind enough to tell me. But do not remain that silent....

  10. brunovernay
    Member
    Posted 8 years ago #

    Hi,
    I am hosted on free.fr too and I succed to connect :

    • as "ghacks" suggested I changed "wp_capabilities" to a:5:{s:13:"administrator";a:2:{s:4:"name";s:13:"Administrator";s:12:"capabilities";a:30:{s:13:"switch_themes";b:1;s:11:"edit_themes";b:1;s:16:"activate_plugins";b:1;s:12:"edit_plugins";b:1;s:10:"edit_users";b:1;s:10:"edit_files";b:1;s:14:"manage_options";b:1;s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:6:"import";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:8:"level_10";b:1;s:7:"level_9";b:1;s:7:"level_8";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;}}s:6:"editor";a:2:{s:4:"name";s:6:"Editor";s:12:"capabilities";a:19:{s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;}}s:6:"author";a:2:{s:4:"name";s:6:"Author";s:12:"capabilities";a:8:{s:12:"upload_files";b:1;s:10:"edit_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:4:"read";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;}}s:11:"contributor";a:2:{s:4:"name";s:11:"Contributor";s:12:"capabilities";a:4:{s:10:"edit_posts";b:1;s:4:"read";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;}}s:10:"subscriber";a:2:{s:4:"name";s:10:"Subscriber";s:12:"capabilities";a:2:{s:4:"read";b:1;s:7:"level_0";b:1;}}} (it may not be optimal, but it worked)
    • Deleted the "cache"
    • deleted the cookies (not sure if it is really usefull)
    • reconnect.

    Did you try this ?
    Bruno

  11. kiwie
    Member
    Posted 8 years ago #

    Not sure if this is the same issue, but here's my problem:

    The install went fine, I could log in and access the admin area. However, very quickly, I got a 403 Forbidden Error. I discovered that if I deleted teh dbx-postmeta cookie, everything went back to normal, until that cookie is recreated in the post.php and edit.php pages. Every time, I delete that cookie and everything works again, I can access the Presentation, Users, Plugins, Manage, Dashboard links, but as soon as I click Write or Edit, I keep getting the 403 "Forbidden - You don't have permission to access /wp-admin/edit.php on this server" error.

  12. kiwie
    Member
    Posted 8 years ago #

    The cookie isn't created when I disable Javascript. In addition, the page loads correctly when it's disabled and does load properly when it IS enabled.

  13. Murderer
    Member
    Posted 8 years ago #

    I'm also having this problem. I just went straight into upgrading as well, so as it stands I can't administer my blog!

  14. kiwie
    Member
    Posted 8 years ago #

    "The cookie isn't created when I disable Javascript. In addition, the page loads correctly when it's disabled and does load properly when it IS enabled."

    Sorry I meant that it does NOT load properly when JS is enabled.

  15. Austin Matzko
    Member
    Posted 8 years ago #

    I ran into the same problem with one of my WordPress setups. None of the other solutions worked, but here's what worked for me; maybe it will help someone else:

    In wp-config.php you can set the table prefixes to whatever you want. For this example, I'm pretending that I've set $table_prefix to 'wp_whatever_'.

    In the "usermeta" table, "wp_whatever_usermeta," there were settings for "wp_user_level" and "wp_capabilities"; However these should have said wp_whatever_user_level" and "wp_whatever_capabilities" respectively.

    Likewise, in the options table, "wp_whatever_options", there was an option for "wp_user_roles" that should have said "wp_whatever_user_roles".

    Changing those settings fixed the problem for me.

  16. lparra
    Member
    Posted 8 years ago #

    I ran into both the 403 Forbidden error and the one included as the topic of this post. The 403 error I fixed by adding the line:

    DirectoryIndex index.html index.php

    Witihin the VirtualHost defined in my local.conf (a.k.a httpd.conf) file for Apache. W/o it Apache didn't know to open up /wp-admin/index.php when wp-login.php redirected to /wp-admin/ upon logging in as the administrator.

    I fixed the "You do not have sufficient permissions to access this page." error by changing the following line in my PHP.ini:

    magic_quotes_runtime = Off

    It was set to "On", and was therefore escaping quotes from data taken from the database. The code for wordpress can probably be changed so this directive can remain "On" if you'd rather be more secure, I suppose. That's just a hunch.

    Anyways, these two small changes worked for me. Just thought I'd share.

  17. artisan949
    Member
    Posted 8 years ago #

    To sum up this problem, because it looks like no one has, this is what works (a cocktail of fixes provided in this thread). If you've upgraded to WP2 using the upgrade.php and are getting the message "You do not have sufficient permissions to acces this page" when accessing the dashboard, do the following:

    Step 1
    Log out of wordpress if you have not already. You should not be signed in.

    Step 2 (from Ghacks)
    *Note: Select INSERT only if the upgrade process did not create the rows. In my case, the upgrade did insert the rows, but inserted / kepted the wrong information at which I had to correct the entry from data from another install and not INSERT a new row. There are a few tweaks to Ghacks attempt.

    Start Phpmyadmin
    Select wp_usermeta table
    Select BROWSE

    Select INSERT*
    user_id = 1
    meta_key = b2capabilities
    meta_value = a:1:{s:13:"administrator";b:1;}

    SAVE

    Select INSERT*
    leave all as is except:
    user_id = 1
    meta_key = wp_user_level
    meta_value = 10

    SAVE

    Select wp_options table
    Select BROWSE

    Select INSERT*
    leave all as is except:
    user_id = 1
    meta_key = wp_capabilities
    meta_value = a:5:{s:13:"administrator";a:2:{s:4:"name";s:13:"Administrator";s:12:"capabilities";a:30:{s:13:"switch_themes";b:1;s:11:"edit_themes";b:1;s:16:"activate_plugins";b:1;s:12:"edit_plugins";b:1;s:10:"edit_users";b:1;s:10:"edit_files";b:1;s:14:"manage_options";b:1;s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:6:"import";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:8:"level_10";b:1;s:7:"level_9";b:1;s:7:"level_8";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;}}s:6:"editor";a:2:{s:4:"name";s:6:"Editor";s:12:"capabilities";a:19:{s:17:"moderate_comments";b:1;s:17:"manage_categories";b:1;s:12:"manage_links";b:1;s:12:"upload_files";b:1;s:15:"unfiltered_html";b:1;s:10:"edit_posts";b:1;s:17:"edit_others_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:10:"edit_pages";b:1;s:4:"read";b:1;s:7:"level_7";b:1;s:7:"level_6";b:1;s:7:"level_5";b:1;s:7:"level_4";b:1;s:7:"level_3";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;}}s:6:"author";a:2:{s:4:"name";s:6:"Author";s:12:"capabilities";a:8:{s:12:"upload_files";b:1;s:10:"edit_posts";b:1;s:20:"edit_published_posts";b:1;s:13:"publish_posts";b:1;s:4:"read";b:1;s:7:"level_2";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;}}s:11:"contributor";a:2:{s:4:"name";s:11:"Contributor";s:12:"capabilities";a:4:{s:10:"edit_posts";b:1;s:4:"read";b:1;s:7:"level_1";b:1;s:7:"level_0";b:1;}}s:10:"subscriber";a:2:{s:4:"name";s:10:"Subscriber";s:12:"capabilities";a:2:{s:4:"read";b:1;s:7:"level_0";b:1;}}}

    SAVE

    Step 3 (by wangxiaohu)
    In your ftp client or web development software, delete the "cache" folder located in the wp-content folder off the main directory. When you sign back in, WP2 will create a new cache folder with all the latest information from the changes made in Step 2. If you do not sign out (as recommended in Step 1), you risk keeping some of the same cache from that sign in and thus you will continue to get the problem.

    Step 4
    Now sign back into WP2. You should now be able to avoid the message and sign into the dashboard. Be sure to signout of your DB as well.

    Hope this will save someone 8 hours of pain.

  18. thisuser
    Member
    Posted 8 years ago #

    Hello everyone. I too had this same problem
    I did a clean install and then got the message that I did have sufficient permissions so I

    1. hand typed in the direct URL (not a virutal one) to the upgrade.php.
    is

    DOMAIN.COM/home/username/public_html/VIRUALBLOGDOMAIN/wp-admin/upgrade.php

    2. this caused me to have a blank page so I typed the direct URL again to domain.com/home/username/publichtml/blogURL/wp-admin
    at which point i got the main dash. and then everything worked

  19. cshaul
    Member
    Posted 8 years ago #

    Hi,

    On a new install, I was getting the sufficient permissions error.

    I edit my .htaccess file to read:

    php_flag magic_quotes_gpc off
    php_flag magic_quotes_runtime off

    Then upon saving that, problem went away. All is well now.

    Thanks to everyone for persisting on this.

    Chris

  20. yurivs
    Member
    Posted 8 years ago #

    Hello
    I just want to change some permissions because my friends - my weblog has 9 authors - can't split (with "more tag") their posts. I don't want to change their rigths, they don't need to edit all the other posts. They are "authors", not "editors", but can't split your own posts. What I need to do?
    Thank's
    Yuri
    _____
    http://blog.karaloka.net

  21. druidictus
    Member
    Posted 8 years ago #

    What the problem is that WordPress sets up _base_ structure when first installing. Without doing a install.php you wont create these base files.

    So empty you database in mysql, then create a black one of the same name and install.php. Then write back you main data base so it goes over the top then recove your admin password if different.

  22. druidictus
    Member
    Posted 8 years ago #

    If you don't want this problem to happen again, you make sure when backing up your schema's that to check the wp_usermeta is included as it may not, or else you will eb forced to do a cleared install each time you want to redo the project.

  23. mysocalledlife
    Member
    Posted 8 years ago #

    Help.

    I don't understand the instructions.

    Can someone give instructions for a complete newbie who upgraded and now just gets "insufficient" errors with every single move.

    Thank you in advance.

  24. duke556
    Member
    Posted 8 years ago #

    Finally, a fix that worked for me :
    1. Renamed (disabled) the plugins-folder, just to be sure
    2. I use a working local copy of my WordPress install,
    so I was ablt to logon, and create a new user , make him admin
    3. Export the wp_usermeta (was somehow not created by the update-process) into sql
    4. Switch to my live database and import said SQL file containing the wp_usermeta-table.
    5.looking good...

  25. candv
    Member
    Posted 8 years ago #

    I tried to ugrade to 2.0.1 and forgot to disable all the plug-ins...I back tracked disabled, but I get the same issue as well, "don't have sufficient premissions". Am I stuck with 2.0 till 2.0.2? Thanks.

  26. cwbrown
    Member
    Posted 8 years ago #

    I'm having this problem too, just did a simple upgrade from 2.0 and disabled all the plugins first. Please help!!

  27. cwbrown
    Member
    Posted 8 years ago #

    I just reinstalled wordpress and it worked fine. If you check the dashboard it still thinks its on 2.0 if thats the case just re-upload the files and run the upgrade script.

    Voila! Solved it for me!

  28. candv
    Member
    Posted 8 years ago #

    Done that 3-4 times....no luck..

  29. pjh
    Member
    Posted 8 years ago #

    I had this problem (on WP 2.01) after changing my database prefix from 'wp_' to something else. In addition to renaming all of my tables, I had to update entries in both the usermeta and options tables. Here are the statements, assuming that I've changed the table prefix from 'wp_' to 'x_'.

    mysql> update x_options set option_name = 'x_user_roles' where option_name = 'wp_user_roles';
    Query OK, 1 row affected (0.00 sec)

    mysql> update x_usermeta set meta_key = 'x_capabilities' where meta_key = 'wp_capabilities';
    Query OK, 2 rows affected (0.25 sec)

    mysql> update x_usermeta set meta_key = 'x_user_level' where meta_key = 'wp_user_level';
    Query OK, 2 rows affected (0.00 sec)

  30. xtc
    Member
    Posted 8 years ago #

    that works perfect.

    if somebody don't understand what happened or how the fix works, msg me, i can explain. or contact me at irc nick: X7C server: irc.cl

Topic Closed

This topic has been closed to new replies.

About this Topic