WordPress.org

Ready to get started?Download WordPress

Forums

Forbidden You don't have permission to access (9 posts)

  1. chirul
    Member
    Posted 1 year ago #

    Dear WordPress Friends,

    I've been cracking my head for the past 2 days on this issue. I came here as the last resort. I hope I'll find a way here.

    Now the issue:

    I'm the admin, in my dashboard area wheneve I click seetings>General > click save changes, I get this:

    Forbidden

    You don't have permission to access /wp-admin/options-general.php on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    Everytime I hit a Save Changes button on this page, it gets me an Forbidden error. No clue where to resolve it.

    Troubleshooting Steps I've taken:

    1. Disabled all myplugins by renaming the plugin folder.
    2. Deleted everything inside the .htaccess (it is 0KB )
    3. Permalinks are default
    4. Theme back to default
    5. Looked for help HERE and HERE. Did Everything I can in my admin Dashboard area, I figured out that it has something to do with mod_sec.
    6. Contacted with my web-host, their reply is mod_sec is disabled.

    Hello,
    
    I could see that ' mod_security ' is currently disabled in the server where your domain ' is hosted. 
    
    Like already mentioned by the previous tech, since wordpress is a third party application, so we canĀ“t offer extended support for the same.
    
    Once you get an update from their support with anything which needs to be done from our end, please feel free to get back to us again.
    
    Looking forward to hear from you, will more than happy to assist you further.
    
    technical details
    =====
    root@user [~]# httpd -l | grep mod_security
    root@user [~]#
    ==
    SecRuleEngine Off
    =====

    7. Even tried to insert this code into .htaccess , no use at all

    # BEGIN WordPress
    
    <IfModule mod_security.c>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </IfModule>
    
    # END WordPress

    I hope somebody knows how to fix it.

    Thanks in advance, Let me know if you need any other details.

  2. datdesignguy
    Member
    Posted 1 year ago #

    Hey

    My first guess would have been mod_sec... Crap! Lol.

    My second thought is you might have some old paths stored in your db. I ran into this very same problem once after migrating a local installation to a client's website.

    I had to comb through the wp_options table, and whereever it had paths to my dev machine stored, I updated the options so that it had the proper linux path.

    something like: SELECT * FROM wp_options WHERE option_value LIKE '%/old/system/path%';

    Of course, if you the site hasn't been migrated from one place to another, then this won't be the problem. I'll dig around and see if I can find anything else of use...

    Are you running 3.4.2?

    -Greg

  3. chirul
    Member
    Posted 1 year ago #

    Thanks Greg for the reply.

    Yes I'm running 3.4.2 latest version of WordPress.

    As you have said, My wild guess is to lookup inside of Database, don't know where to start and what to look for. But I can say it is not a migrated site.

    Keep me updated if you find anything else.

  4. datdesignguy
    Member
    Posted 1 year ago #

    can you also check file permissions and ownership of the options-general.php file? Do you know how to do that?

    Your permissions on the file should be 644, and the ownership should match that of the other documents, index.php for example.

  5. chirul
    Member
    Posted 1 year ago #

    Yes, I've check whole wordpress director,
    All file permissions are 644 and Folder permissions are 755.

    Still can't find a way to get this solved.

  6. datdesignguy
    Member
    Posted 1 year ago #

    Are you using the english version of wordpress? ( May be a silly question, but I was reading here... that localization could be a factor )

  7. chirul
    Member
    Posted 1 year ago #

    Yes, indeed English version.

    After checking up with webhost, my previous host has been acquired by the new host. SO possibly any references to check in the databases?

  8. Mixuha
    Member
    Posted 1 year ago #

    Sorry for my english. I have the same problem. This is server settings. Try phpinfo() and look at server API field. If you see "CGI/FastCGI" - your problem here. I dont know why, but if php installed not as module for apache - i have this issue randomly.

  9. Steven Lambert
    Member
    Posted 1 year ago #

    I had this same problem, and after temporarily deleting all my .htaccess files, then trying to modify them as suggested, and making sure all my files and folder permissions were set to 777, I still couldn't get it to work. I don't know why I couldn't access the file, but I was able to create a new file and access it no problem. So what I did was create a new file in /wp-admin/ called temp.php and pasted all the code from install.php into it. This allowed me to access the file. The only other thing I had to do was edit the code so that the form submitted to temp.php instead of install.php. After that, I could finish the install and everything worked.

    <form id="setup" method="post" action="temp.php?step=2">

Topic Closed

This topic has been closed to new replies.

About this Topic