WordPress.org

Ready to get started?Download WordPress

Forums

iThemes Security (formerly Better WP Security)
Unable to write to your .htaccess or nginx.conf file. (58 posts)

  1. rwnfrnnd
    Member
    Posted 3 months ago #

    @heartharmony The latest version of the plugin shows a popup window with some basic configuration options at some point after you activated it (can't remember if it needs to click on a button). Did you get that popup window?

  2. lgustaw
    Member
    Posted 3 months ago #

    Wombat solution in my case solved the problem.

  3. Blublkgal
    Member
    Posted 3 months ago #

    my goodness! what a mess! I've just updated today, a few hours ago - the most frustrating few hours about spending almost 24 hours reconfiguring a site that crashed!

    on top of all the same problems you've all been having, the damn plugin is constantly making me do the same settings over!

    tried Wombats solution but it's not working because it keeps undoing all my settings

    rolling back to ver 3.6

  4. heartharmony
    Member
    Posted 3 months ago #

    Hi rwnfrnnd - yes I did all the usual configurations including grant access to write to .htaccess. I am either rolling back yet again to version 3.6 that continues to work correctly or working through how to fully uninstall (not a simple one-click uninstall process unfortunately) and putting in other solutions. I was a rabid supporter of this plug-in (and happily donated for its support)- not any more.

  5. heartharmony
    Member
    Posted 3 months ago #

    Finally gave up and uninstalled it from across my sites and all my client's sites (after manually having to delete code from htaccess files that were not removed after the uninstall).

    I put in Wordfence. Smooth install, no buggy code, and the paid option already has working 2 factor identification & geoblocking. Thanks for whoever in these threads put me onto it - a much better option.

    Given the increased vulnerability across the web at the moment, the risk of buggy code was too great.

  6. Wombat
    Member
    Posted 3 months ago #

    I ran into this again this morning on another site... the solution to the "It looks like another process might already be working on the file" error is to check the box at the bottom of the first section: "Disable File Locking".

  7. mouli
    Member
    Posted 3 months ago #

    I have this issue as well.
    I worked through all the solutions here and the only one that worked was disabling file locking.
    Its as if the plugin is locking itself out of .htaccess.
    I disabled file locking, made my changes to the settings and saved them.
    The htaccess file was indeed written to so I enabled file locking again since I believe it should be used to avoid the htaccess corruption issues that older version had if the site came under a big brute force attack causing multiple writes to the file.

  8. phile2
    Member
    Posted 3 months ago #

    Same “Unable to release a lock on your .htaccess or nginx.conf file. If the problem persists contact support.” Error after upgrade to 4.0.12 (from 3.6.6) on WP 3.8.1

    I forgot to disable iThemes Security on this particular site before the plugin upgrade. It was the 3rd site I was upgrading and I did not get this error on the other two (which did have the plugin disabled before the upgrade)
    I too only noticed the error when the DB backup email had no attachment in the scheduled backup. Again working fine on the other sites.

    I decided to apply the new update 4.0.21 a few days after the release and monitoring this site.
    Thought I would disable the plugin before the update this time and was promptly locked out of my site.
    Attempts to access the site showed forcing to https: (I had not made any changes to ssl, previously used ssl or system tweaks)
    Checked wp-config.php and found the following had been added apparently when I attempted to disable iTS:

    define( 'FORCE_SSL_LOGIN', true );
    define( 'FORCE_SSL_ADMIN', true );
    define( 'DISALLOW_FILE_EDIT', true );

    Set all 3 to false and was able to get back in to wp-admin
    Deleted iTS plugin from the admin panel
    Installed the new iTS 4.0.21 and all appears fine so far… can update settings, backup working again, etc.

  9. natostanco
    Member
    Posted 3 months ago #

    including the new nginx rules generated by the plugin into nginx does not work for me. Nginx error:
    invalid hostname or wildcard "*"

    Part of the file responsible is :

    location /wp-comments-post.php {
    
                    valid_referers jetpack.wordpress.com/jetpack-comment/ *;
    
                    set $rule_0 0;
    
                    if ($request_method ~ "POST"){ set $rule_0 1$rule_0; }
    
                    if ($invalid_referer) { set $rule_0 2$rule_0; }
    
                    if ($http_user_agent ~ "^$"){ set $rule_0 3$rule_0; }
    
                    if ($rule_0 = "3210") { return 403; }
    
                }
  10. hai3009
    Member
    Posted 3 months ago #

    Same error here.

    WordPress was unable to save the your options to .htaccess or nginx.conf file.

    I have the newest version 4.0.21 and WordPress 3.8.2
    hmmm...
    What to do, i'm confused.

  11. Zoinks! Graphics
    Member
    Posted 3 months ago #

    I ran into this again this morning on another site... the solution to the "It looks like another process might already be working on the file" error is to check the box at the bottom of the first section: "Disable File Locking".

    Wombat comes through again: The "Disable File Locking" solution above worked like a charm!!

  12. Shinobi128
    Member
    Posted 3 months ago #

    I am here because I received the error as well, but I seemed to have fixed it from my end. Hopefully it will work for you too.

    When I'm not maintaining my sites, I enable "Remove File Writing Permissions." Part of my conflict is that I also use W3 Total Cache, but here is what I did.

    1. Deactivate iThemes Security.
    2. Empty all the page caches from within W3 Total Cache.
    3. Reactivate iThemes Security.
    4. Test by enabling/disabling "Remove File Writing Permissions."

    Good luck.

  13. Dee S
    Member
    Posted 3 months ago #

    This is really annoying guys - appreciate that iThemes are trying to improve their product but these issues should have been tested before the rollout given that so many people are having them. We are configuring a couple of client sites each with the "cannot write to .htaccess etc." issue and have rolled back to V 4.08 of the plugin in the meantime since it's working as expected.

    Will hold off on upgrading any of our sites until we hear any positive feedback on this thread.

  14. digibobdeluxe
    Member
    Posted 3 months ago #

    So annoying.

    It does not write my IP to the whitelist and locks me out all the time. The amount of time I have wasted is ridiculous.

  15. Tim Reeves
    Member
    Posted 3 months ago #

    Damn. I've nursed about 5 sites into working with iTS, by manually editing .htaccess and/or wp-config.php, after I edit once it seems to work from then on.
    But now I just created a NEW subdomain (Ubuntu 12.04 Plesk 11.5, secured with a good cert) and loaded WP 3.9 (German) and iTS 4.0.23 (no other plugins or theme), and as very first action tried to move my wp-content: Unable to write to your .htaccess or nginx.conf file.
    This is really frustrating, especially since I'm using fastCGI and WP runs with the uid/gid of the Plesk Workspace, same as FTP. In other words, PHP certainly CAN write those files, but iTS won't, even after I selected "Disable File Locking".
    I've not tried the Wombat solution since I just don't see that it should be neccessary on a completely virgin installation.
    Instead I deactivated iTS and installed WordFence.
    WordFence (I did'nt know it before) concentrates on keeping attackers out by blocking them, and repairing compromised installations. It does NOT do a lot of the things which iTS does to prevent them from ever getting in, so I would really prefer to use iTS - IF it would work!
    Finally, my sympathies to the developer(s), I'm sure you're doing your very best and I wish you quick success with finding and repairing the root cause of these problems.

  16. Tim Reeves
    Member
    Posted 3 months ago #

    Just a hint to the developer: When iTS should write .htaccess or wp-config.php, the files mtime gets updated to now, but the content is not changed.

    Other than that, I just did a fall-back to BWPS 3.6.6 - works like a dream, I'll stick with that a while.

  17. Zoinks! Graphics
    Member
    Posted 3 months ago #

    UPDATE: "Disable file locking" only worked to make it SEEM like backups were running. iThemes Security's backup features are still not working on my 3 sites, even after WP 3.9 updates -- 2 on different DreamHost accounts and one on GoDaddy. Closest they come are emails claiming that backups are attached but with zero attachments.

    iThemes Security's other features are still super-useful, so I've disabled its malfunctioning backup settings and installed "UpdraftPlus - WordPress Backup and Restoration" which works like a charm sending scheduled backups -- not just of the database but of the entire site if I so choose!

    https://wordpress.org/plugins/updraftplus/

  18. steveisaacs
    Member
    Posted 3 months ago #

    I had the same issue. Tried Wombat's first solution (delete htacess, delete iThemes, reinstall) which didn't work.

    His second fix "disable file locking" seemed to work, but sent me an empty email. Probably going to use a different plugin. What a shame.

  19. TabyP
    Member
    Posted 3 months ago #

    Evertytime I make a change to the plugin settings and then try to save I get the same message:

    WordPress was unable to save the your options to .htaccess or nginx.conf file. It looks like another process might already be working on the file. Please wait a few minutes and try again or contact support if the problem persists.

    Also, my first login attempt always fails!! Always! It's becoming very annoying.

  20. Daniel Marquard
    Member
    Posted 3 months ago #

    I have the same problem. Thanks for the suggestions for fixing this, but they're not working. It's frustrating because I rely on error messages to resolve problems like these, and when iThemes reports that nginx.conf couldn't be written, that's less than helpful. The file exists and is chmod 777.

    An update was just released for iThemes, but it does not address this issue...

  21. steveisaacs
    Member
    Posted 3 months ago #

    I am happy to pay for premium plugins, but it seems that many of us have this core problem, that even with updates, goes unresolved. Makes me MUCH less likely to pay for the plugin unless this is addressed.

  22. Tim Reeves
    Member
    Posted 3 months ago #

    Well, we're now at Vn. 4.1.5 and the problem is STILL there. I find this very discouraging. I just created a new WP site, everything virgin, iTS the only plugin, the first I do is hide the admin user - works fine - and the second I do is to rename the wp-content directory. Same old problem: Unable to write to your .htaccess or nginx.conf file.

    The symptom remains, that .htaccess mtime gets updated but not the content. And yes, I have disabled file locking. All to no avail.

    Hosting details: Ubuntu 12.04 LTS with Plesk 11.5, using mod_fcgid - could there be a problem here with FastCGI???

    There is a repeated error in my PHP error log: mod_fcgid: stderr: PHP Warning: mb_strpos(): Empty delimiter in /var/www/vhosts/{hidden}/plugins/better-wp-security/core/class-itsec-files.php on line 1196, referer: {hidden}/wp-admin/plugins.php?deleted=true&plugin_status=all&paged=1&s=

    But that goes away when I remove "mbstring.func_overload = 7" from the php.ini. Otherwise all default php settings in Plesk.

    Only real solution seems to be to turn Global Settings | Write to Files off and manually edit .htaccess und wp-config.php.

    Chris, can't you DO something - this is getting beyond a joke...

  23. Tim Reeves
    Member
    Posted 3 months ago #

    AHA - now it's writing .htaccess and wp-config.php

    What did I change? Enabled Permalinks.

    I can hardly believe that that's causing the problem, but maybe it really is - and IF it is, then we need a more specific error message, like "Unable to write to your .htaccess or nginx.conf file - please activate Permalinks in your WordPress Settings".

  24. steveisaacs
    Member
    Posted 3 months ago #

    I checked that - re-enabled permalinks, and still get the error.

  25. Daniel Marquard
    Member
    Posted 2 months ago #

    I have a possible SOLUTION for you guys! After much trial and error, the plugin magically started working correctly and wrote to my nginx.conf without issue.

    I changed the "NGINX Conf File" in the plugin's settings to a new, blank file. The plugin immediately began writing to the new file, so I reverted the field back to the nginx.conf path and all was well.

    No idea what caused this, but it's probably some kind of bug. I hope this fixes it for you guys.

  26. Sandeep Bhalla
    Member
    Posted 1 month ago #

    I have a similar problem. the message I receive is:

    Unable to write to your .htaccess or nginx.conf file. If the problem persists contact support.

    The file path entered does not appear to be valid. Please ensure it exists and that WordPress can write to it.

    where is nginx.conf file? I can not locate it?

    BTW I also have another access or ownership problem with wp-content directory which I have posted here:
    http://wordpress.org/support/topic/unable-to-upload-pictures-6

  27. Ramzii
    Member
    Posted 1 month ago #

    Unable to write to your .htaccess or nginx.conf file. If the problem persists contact support.

    When I try to save a backup... help?
    Hasnt this issue been solved after two months. Hmm.

    Im using the latest version, please advice; thank you.

  28. Sandeep Bhalla
    Member
    Posted 1 month ago #

    Can't even uninstall iThemes. Permission denied.
    Nor new plugins can be installed.
    I think one should stay away from iTheme security.At least until it is resolved.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.