The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Delete lines from .htaccess file after suspend

Discussion in 'cPanel Developers' started by Mo9a7i, Nov 1, 2009.

  1. Mo9a7i

    Mo9a7i Registered

    Joined:
    Nov 1, 2009
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hello everyone,

    I have the "Options" directive blocked from httpd.conf so that clients can't use that in their home directories for security reasons.

    The problem is, when account is suspended using cpanel, cpanel creates an .htaccess file that includes the following:
    "RedirectMatch .* http://${host}/suspended.page/\n";
    "Options -Includes -Indexes -ExecCGI\n";

    and that creates a "500 internal server error" if the options directive is blocked.
    I've read the /scripts/suspendacct script and found the lines responsible for the creation of .htaccess
    I have deleted the line that contains "Options -Includes -Indexes -ExecCGI\n";

    but i think cpanel keeps updating that file whenever it upgrades /scripts/upcp

    I even tried adding some instructions in the /scripts/postupcp file that tries to comment that specific line but it doesn't seem to be working.

    I'm not aware about upcp process so i'm not sure how to solve this problem and thats why i really need your help



    can you provide me with the best solutions for this problem and if /scripts/postupcp is enough, what could be the command that can solve my problem?


    Thanks

    Mohannad Otaibi
    Hardlayers.com
     
Loading...

Share This Page