• A little over 6 months ago, in response to mrprainx in the forum post .htaccess file in wpcf7_uploads, Takayuki Miyoshi wrote:

    Deny from all is an ancient directive and has been kept just for backward compatibility. It’ll be updated in the near future.

    Alas, this still is not updated. The “ancient directive” caused our colleague to be unable to log into his webmail account at all. After an excessive amount of searching in the cPanel error message to see client denied by server configuration: /home/mywebsitename/public_html/.user.ini, and wandering around the internet to find the fix, I finally found the .htaccess file that was causing us so much grief: /wp-content/uploads/wpcf7_uploads/.htaccess. I manually changed Deny from all to Require all denied in the .htaccess file, and hey presto, our colleague was suddenly able to access his email again.

    To prevent others from experiencing the same nightmare, please replace this ancient directive ASAP. Thank you.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    The ancient Apache directive has nothing at all to do with your colleague’s email trouble.

    Thread Starter ejm

    (@llizard)

    I think you may be mistaken. My colleague was unable to access webmail (he kept getting a message that his password and email were invalid) until I changed Deny from all to Require all denied in the .htaccess file located in the wpcf7_uploads folder. As soon as this was changed, he was finally able to access his email via webmail.

    resources:

    Therefore, please remove the ancient Apache directive. There is strong evidence that the “backwards compatibility” is causing cPanel’s webmail operation to break.

    Thank you.

    I believe it’s best to use a Apache version detection technique such as:

    <IfModule mod_authz_core.c>
      Require all denied
    </IfModule>
    <IfModule !mod_authz_core.c>
      Order deny,allow
      Deny from all
    </IfModule>
    Thread Starter ejm

    (@llizard)

    Thank you for you reply, jasonabmw.

    Only really knowing enough about coding to get myself in trouble, to make it so that my colleague could once again access webmail, this is what I manually changed the coding to look like in /wp-content/uploads/wpcf7_uploads/.htaccess:

    # Deny from all
    # ll change.... re: https://linux.101hacks.com/unix/client-denied-by-server-configuration/
    Require all denied

    Will the following work as well?

    <IfModule mod_authz_core.c>
      Require all denied
    </IfModule>
    <IfModule !mod_authz_core.c>
      Order deny,allow
      Deny from all
    </IfModule>

    I am hesitant change it and perhaps break my colleague’s access to webmail again….

    Assuming your current code snippet matches the version of Apache you’re currently using, this should work just as well and be more portable.

    The benefit of this snippet is that it will work regardless of the version of Apache installed on the server, and not crash on the wrong version.

    Thread Starter ejm

    (@llizard)

    Thank you for your reply, jasonabmw. Yes, the code snippet I used does indeed match our server’s version of Apache. I will do as you say, and until the coding is fixed by the plugin (I cannot find where the directive for it is in the plugin files), I will manually change it.

    I see that this plugin has just been updated, but the .htaccess file remains the same. Takayuki Miyoshi, I trust you will fix the /wp-content/uploads/wpcf7_uploads/.htaccess file coding to provide backward compatibilty as well as forward compatibility in the next update.

    Thank you.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘please fix .htaccess file in wpcf7_uploads’ is closed to new replies.