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.

cgi-bin in public_html folder

Discussion in 'Security' started by ozzieonline, Dec 23, 2012.

  1. ozzieonline

    ozzieonline Well-Known Member

    Joined:
    Dec 20, 2012
    Messages:
    126
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hi there,

    A cgi-bin folder keeps appearing in my public_html directory.
    When I delete the folder and login again, it reappears!

    I have 2 questions:

    1) Anyone else having this experience?
    2) Is there a solution to stop the cgi-bin folder from appearing?

    Many thanks in advance!
     
    #1 ozzieonline, Dec 23, 2012
    Last edited: Dec 23, 2012
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,453
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    You might try modifying the Package the account uses.
    Home » Packages » Edit a Package, Settings section, uncheck, CGI Access.

    If you need this enabled for other accounts, modify the account instead.
    Home » Account Functions » Modify an Account, Privileges section, uncheck, CGI Privilege.
     
  3. ozzieonline

    ozzieonline Well-Known Member

    Joined:
    Dec 20, 2012
    Messages:
    126
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Thanks for your reply. However "CGI access" as well as "CGI privilige" are both disabled on my account. This doesn't solve the problem.

    The cgi-bin directory keeps reappering each time I login (I use SFTP to login). It's very annoying.
     
  4. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,453
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  5. ozzieonline

    ozzieonline Well-Known Member

    Joined:
    Dec 20, 2012
    Messages:
    126
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Allright... so I'm not the only one...

    Is there a solution for this problem? It really is annoying to find something in your public_html folder that doesn't belong there at all.
     
  6. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,453
    Likes Received:
    195
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    CGI is enabled for Mod_SuPHP via Easy Apache.


    Hardly annoying in my opinion though, one directory of many.
     
  7. ozzieonline

    ozzieonline Well-Known Member

    Joined:
    Dec 20, 2012
    Messages:
    126
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    How can I disable it?
     
  8. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    in /etc/bashrc there is:

    Code:
    if [ ! -e ~/public_html/cgi-bin ]; then
            mkdir -p ~/public_html/cgi-bin
    fi
    
     
  9. ozzieonline

    ozzieonline Well-Known Member

    Joined:
    Dec 20, 2012
    Messages:
    126
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    These exact 3 lines I have to delete?
     
  10. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    just comment them out:

    Code:
    #if [ ! -e ~/public_html/cgi-bin ]; then
    #        mkdir -p ~/public_html/cgi-bin
    #fi
    
     
  11. ozzieonline

    ozzieonline Well-Known Member

    Joined:
    Dec 20, 2012
    Messages:
    126
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Great! Thanks a lot. I was searching for a solution but couldn't find it, until now. I really appreciate it :)
     
  12. ozzieonline

    ozzieonline Well-Known Member

    Joined:
    Dec 20, 2012
    Messages:
    126
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Tried it and it works very well! Thanks again quietFinn!
     
Loading...

Share This Page