• Resolved cheddargeorge

    (@cheddargeorge)


    Hi.

    I have All In One WP Security installed, but whenever I try to do anything which entails it writing to .htaccess then it fails with “Could not write to the .htaccess file. Please check the file permissions.”

    However, the .htaccess permissions appear fine (even WP Security says so in the filesystem security tab), and are set to 644, and the root directory (i.e. the main WP directory in which .htaccess resides) is 755.

    This is on a CentOS server, running Apache, and the file has ownership of apache:apache (i.e. owner of apache and group of apache), which it should do.

    Any assistance would be much appreciated. Thanks!

Viewing 6 replies - 31 through 36 (of 36 total)
  • Plugin Support vupdraft

    (@vupdraft)

    New users can configure the plugin, we have tested this. I believe the issue specifically related to new users using Linux. Could you copy and paste the contents of your .htaccess (concealing any sensitive information)
    The two issues, we believe are related, so we would just be duplicating the contents of this thread.

    1.) I am fairly sure that @cheddargeorge and myself both qualify as new users and we cannot configure the plugin after 3 weeks full weeks of your team of developers repeatedly telling use to do the exact same actions multiple times. So I am correct in my assessment that new users cannot configure the plugin following installation. I wish that wasn’t true, but unfortunately is.

    2.) You have requested the contents on my .htaccess… but again your team previously had me test using a 100% empty .htaccess file and that did not work…

    But repeating the same actions again 3 weeks later…. here you go…meaningless content:

    `admin@test:~/public_html$ cat .htaccess
    # BEGIN NON_LSCACHE
    ## LITESPEED WP CACHE PLUGIN – Do not edit the contents of this block! ##
    ## LITESPEED WP CACHE PLUGIN – Do not edit the contents of this block! ##
    # END NON_LSCACHE
    # BEGIN LSCACHE
    ## LITESPEED WP CACHE PLUGIN – Do not edit the contents of this block! ##
    <IfModule LiteSpeed>
    RewriteEngine on
    CacheLookup on
    RewriteRule .* – [E=Cache-Control:no-autoflush]
    RewriteRule \.litespeed_conf\.dat – [F,L]

    ### marker NOCACHE COOKIES start ###
    RewriteCond %{HTTP_COOKIE} cookies_and_content_security_policy
    RewriteRule .* – [E=Cache-Control:no-cache]
    ### marker NOCACHE COOKIES end ###

    ### marker CACHE RESOURCE start ###
    RewriteRule wp-content/.*/[^/]*(responsive|css|js|dynamic|loader|fonts)\.php – [E=cache-control:max-age=3600]
    ### marker CACHE RESOURCE end ###

    ### marker FAVICON start ###
    RewriteRule favicon\.ico$ – [E=cache-control:max-age=86400]
    ### marker FAVICON end ###

    ### marker DROPQS start ###
    CacheKeyModify -qs:fbclid
    CacheKeyModify -qs:gclid
    CacheKeyModify -qs:utm*
    CacheKeyModify -qs:_ga
    ### marker DROPQS end ###

    </IfModule>
    ## LITESPEED WP CACHE PLUGIN – Do not edit the contents of this block! ##
    # END LSCACHE`

    Again, I tested with all plugins deactivated except yours, and the plugin did not work so this request for this htaccess content is pointless.

    But hey lets how long it takes before vupdraft admits your plugin might have a bug and may not be functioning problem…

    Thread Starter cheddargeorge

    (@cheddargeorge)

    @dragonsway76
    You’re far more patient than I am. I already gave up on them a little while back. They obviously no clue what they’re doing, which is unfortunate.

    But good luck anyway, thx for adding additional comments and posts, and if you ever somehow figure out a solution then I’d be very pleased to know it. Likewise if I ever figure it out I’ll post back here. But I can imagine we can rest assured that there won’t be any solution from the plug-in authors.

    gilesnr

    (@gilesnr)

    It’s solved for me after looking into the code and debug logging in the wordpress database.

    The permission error occurred because I was blanking out the Server response header in the Apache2 settings for security reasons. If you make sure the response header is set to minimally ‘Apache’ say, this will satisfy the plugin and it will write to .htaccess successfully.

    My Apache2 code:

    
    <IfModule security2_module>
        SecStatusEngine on
        SecRuleEngine on
        ServerTokens Full
        SecServerSignature "Apache"
    </IfModule>
    dragonsway76

    (@dragonsway76)

    My friend, how correct you are… and well timed you are.

    Thanks for that.

    I had to change my ModSecurity Firewall .conf file the same way as you described… and that solved my .htaccess problems with aiows, additionally it solved a minor problem with 23 total cache as well.

    Thanks again.

    gilesnr

    (@gilesnr)

    Great ! Glad to have helped.

Viewing 6 replies - 31 through 36 (of 36 total)
  • The topic ‘Could not write to the .htaccess file. Please check the file permissions.’ is closed to new replies.