• Resolved ionlera

    (@ionlera)


    Hey everyone!
    yesterday we had an attack in our server through one of our websites. We contacted the server host and it got fixed.

    Today I changed “admin” username for a different one as someone recommended me, deleted a couple of plugins and one theme that were not active.

    After a while of doing it, I realised that both website and wp-admin were not available.
    – When trying to access the web I get: ACCESS DENIED
    – When trying to access wp-admin, I get this message:

    Warning: require_once(/homepages/4/d368566954/htdocs/zoo2017/wp-config.php): failed to open stream: Permission denied in /homepages/4/d368566954/htdocs/zoo2017/wp-load.php on line 37

    Fatal error: require_once(): Failed opening required ‘/homepages/4/d368566954/htdocs/zoo2017/wp-config.php’ (include_path=’.:/usr/lib/php5.6′) in /homepages/4/d368566954/htdocs/zoo2017/wp-load.php on line 37

    Any clues?? Sorry Im not experienced at all…

    Thank you in advanced!

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Somehow all the FTP files permission were erased, including the read permission.
    You have to grant at least the read permission in the FTP directory where the WordPress is installed.
    If you have access to the FTP files you can apply these permissions by following the Codex article: https://codex.www.ads-software.com/Changing_File_Permissions .
    If you don’t have access you’ll have to contact your server and ask them to do this for you.

    Thread Starter ionlera

    (@ionlera)

    Wow! that was fast!
    THANK YOU VERY MUCH Mateus! I will get permissions for the FTP tomorrow morning and I will follow those instructions!
    Might be caused by an attack? or because I deleted the “admin” user and created a new admin user with a different name?

    Thread Starter ionlera

    (@ionlera)

    Hey again!
    Finally I do have access to the FTP files. But Im not sure now where to which files I should give permissions…
    Can I just give same permissions to the whole root directory where the website is hosted? Or I have to select which files permissions I give to each specific file??
    Thank you again and sorry to bother…

    Are you accessing your FTP server by a FTP client(such as Filezilla eg.), Linux terminal server(SSH connection) or Windows environment(RDP access)?

    Thread Starter ionlera

    (@ionlera)

    Filezilla

    The best option here would be to give read permission to the whole directory, this procedure changes depending on which platform you use to manage your FTP files.

    Other thing you should have on mind is that WordPress requires write permissions to install/update plugins or themes.
    If WordPress hasn’t got this permission it will pop up a modal window requiring credentials that have them whenever you try to install/update plugins or themes.

    One way to solve this is:
    Grant read permission on the WordPress folder to everybody.
    Grant write permission to a specific user.
    Change your wp-config.php file and put this user’s credentials in this file.
    To do to please follow this tutorial by Codex: https://codex.www.ads-software.com/Editing_wp-config.php#WordPress_Upgrade_Constants

    Thread Starter ionlera

    (@ionlera)

    Ok man! I will try what you said step by step!
    Again, thank you very very much!

    In Filezilla you can change the permissions by right-clicking the folder/file and accessing its properties.
    You can grant to the Owner and to the Group Read+Write permissions and to the Public only read permission.

    In this case you already has an user to put in the wp-config.php file, which is the same user you use to access the FTP server.
    You can choose whether to put your credentials every time you’re going to install/update something or to let it setup in the wp-config.php.
    This file isn’t accessible to the public due .htaccess rules, so that wouldn’t imply in a security issue.

    I hope everything works out just fine.

    Thread Starter ionlera

    (@ionlera)

    Hey! thank you very much for your help…but we must have a bigger issue here. As fast as I changed the permissions, all the content from all folders dissapeared ??
    I will try to backup now to an older version and see what happens…

    That’s quite strange and unusual, I’ve never heard of anything like that happening before.

    One possibility that could explain all of it is that the Host couldn’t fix your Website completely and it remained hacked somehow. If that’s the case, as soon as you gave the permissions some sort of script was able to find its way to be executed and delete all the files.

    If that’s so, you’ll have to be sure that your backup Website isn’t hacked as well.

    An alternative you’ve got is to install a Wamp server in your PC to do all the necessary tests locally, by doing that you won’t have to upload your entire Website every time you need to test something.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Permission denied to web and wordpress’ is closed to new replies.