Defender Errors When Trying to solve issues

Hi there,

I've got Defender installed on my site and it says there are 3 errors: Prevent Information Disclosure, Prevent PHP execution, and update plugins and themes to the latest version. I try to 'solve' the issues by doing the recommended command, but it just errors each time. Can someone help me figure this out? The site is running well as ever, just want to keep this up to par.

Let me know when you can.

Thank You,

- Mark

  • Kasia Swiderska
    • Support nomad

    Hello Mark,

    I checked on my site if this is also happening but could .htacces files without no problem - but I can confirm that this is not working on your site.

    Could you please enable debug mode in your WordPress and then try again. To enable it, open your wp-config.php file and look for define(‘WP_DEBUG’, false);. Change it to:

    define('WP_DEBUG', true);

    In order to enable the error logging to a file on the server you need to add yet one more similar line:

    define( 'WP_DEBUG_LOG', true );

    In this case the errors will be saved to a debug.log log file inside the /wp-content/directory.

    Depending on whether you want your errors to be only logged or also displayed on the screen you should also have this line there, immediately after the line mentioned above:

    define( 'WP_DEBUG_DISPLAY', false );

    The wp-config.php is located in your WordPress root directory. It’s the same file where the database configuration settings are. You will have to access it by FTP or SFTP in order to edit it. I would need then to see contents of the debug.log file - so please paste it to the text file and attach to post.

    kind regards,
    Kasia

  • Nithin
    • Support Wizard

    Hi M Hipsh,

    Hope you are doing good today. :slight_smile:

    I did give a quick scan to test it. Could you please share your debug.log file so that we can give a closer look. You can find the debug.log file inside your /wp-content directory, please do note to attach the log file in 'txt' format. Or you could provide a link of the debug.log file, using the Cloud services like Dropbox, Google Drive etc.

    Please let us know how that goes. Have a nice day. :slight_smile:

    Kind Regards,
    Nithin

  • Kasia Swiderska
    • Support nomad

    Hi M Hipsh,

    It looks like we need developer input here to investigate this issue - it might be problem with permissions. Could you please send in the following via our secure contact form https://premium.wpmudev.org/contact/ :

    - Mark to my attention, the subject line should contain only: ATTN: Kasia Swiderska
    - Do not include anything else in the subject line, doing so may delay our response due to how email filtering works.
    - Link back to this thread
    - Include WordPress admin access details (login address, username & password)
    - Include FTP log-in details (hostname, username & password)
    - Include any relevant URLs for your site

    IMPORTANT: Please make sure you select "I have a different question" for your topic, so it doesn't go back to the forums - this and the subject line ensure that it gets assigned to me.

    kind regards,
    Kasia

  • Rupok
    • Support Ninja

    Hi Mark, hope you had a wonderful day.

    When I tried to fix the "Prevent PHP execution" issue, it showed me the following error:
    Can't write to the file /home/content/p3pnexwpnas02_data03/10/2473410/html/wp-includes/.htaccess
    This clearly indicates, WordPress can't write inside your "wp-includes" directory which is a permission issue or some other plugin is blocking the access. All three issues left are being caused by permission issue I personally think.

    Can you confirm all your directories have 755 or 750 permission and all files have 644 or 640? If yes, can you please do a plugin conflict test just to make sure no other plugin is causing this? To know more about plugin conflict, you can check this article: http://premium.wpmudev.org/manuals/using-wpmu-dev/getting-support/

    I'll flag our developer as soon as you confirm.

    Have a nice day. Cheers!
    Rupok

  • M Hipsh
    • Site Builder, Child of Zeus

    Hey there,

    I will do the plugin test for sure, but when you say - "Can you confirm all your directories have 755 or 750 permission and all files have 644 or 640?"

    I haven't heard of this before, how do I check this?

    Let me know,

    Thank You,

    - Mark

  • Nithin
    • Support Wizard

    Hi M Hipsh,

    Hope you are doing good today. :slight_smile:

    I will do the plugin test for sure, but when you say - "Can you confirm all your directories have 755 or 750 permission and all files have 644 or 640?"

    You can check a folders/files permission by using a FTP client, and logging in to your root directory. You can find the permissions listed in the right hand side column. To edit permission, right click on a particular file or folder, and then select ''File permission'.

    You'll have to check whether your folders have either 755 or 750 as permission, and your files either 644 or 640. Exception would be the wp-config.php file located in your root directory, as it should be 440 or 400.

    Please check this link to know more details about understanding file permissions:
    https://premium.wpmudev.org/blog/understanding-file-permissions/
    http://codex.wordpress.org/Changing_File_Permissions

    Please let us know if you need any further help. Have a nice day. :slight_smile:

    Kind Regards,
    Nithin

  • M Hipsh
    • Site Builder, Child of Zeus

    Ok got it. I want to check before I change anything though as I don't want to mess something up. The file permissions that show up for me are quite a bit different, I attached a screenshot of the list and then 3 screenshots after right clicking on the permissions options - all have a different numeric value. Should I really go in and change all these?

    Let me know what you think.

    Thank You,

    - Mark

  • Nithin
    • Support Wizard

    Hi M Hipsh,

    Thank you for sharing the screenshot, it seems like your folders are having different permissions, permissions for /wp-admin & /wp-includes looks fine as the folders won't get written. Easiest option would be to change the values of all the folders and files as suggested above. Please check the 'recurse into subdirectories' option, and then check 'Apply to directories only' so that the sub-folders would also have the same permission, otherwise you'll have to manually change the permissions for each subfolders.

    Please check this link to know more details about understanding file permissions:
    https://premium.wpmudev.org/blog/understanding-file-permissions/
    http://codex.wordpress.org/Changing_File_Permissions

    I hope this helps. Have a nice day. :slight_smile:

    Kind Regards,
    Nithin

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.