.htaccess files keep resetting to 444 instead of 755

Avatar
  • updated
  • Answered
Have 2 Wordpress sites on VPS server. One install is on public folder, other in a subfolder.

At times, I get a message on backend that WPRocket cannot write to htaccess file because it does not have the permission, so when I check the htaccess files, they are set to 444. I set them to 755, but they reset to 444 after some time.

I have ran Sucuri malware and found nothing wrong, also deleted Wordfence security plug in which is said to sometime cause this.

Avatar
JT S.
Quote from pinguisweb

I am coming across some infected websites that the ,htaccess file permissions set to 444. My suggestion is strip the website down to bare needed. then check for unneeded/not usual wordpress files in the wp-content folder delete them then reinstall wordpress through dashboard

Thanks for commenting. To add, consider Cerber Security and BBQ: Block Bad Queries.

Also, check out our 10 Ways to Harden Your VPS Hosting.

Avatar
pinguisweb

I am coming across some infected websites that the ,htaccess file permissions set to 444. My suggestion is strip the website down to bare needed. then check for unneeded/not usual wordpress files in the wp-content folder delete them then reinstall wordpress through dashboard

Avatar
anonymous
Hello,

Thank you for your question on file permissions. This is not normal as we assign 644 to the .htaccess file so some plugin must still be changing this. Also do you have any cron jobs enabled? Have you tried disabling all of your plugins to see if any of them are making this change?

Best Regards,
TJ Edens