Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    16,585
    Likes Received:
    439
    Trophy Points:
    583
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  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:
    16,585
    Likes Received:
    439
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  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:
    16,585
    Likes Received:
    439
    Trophy Points:
    583
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  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:
    11
    Trophy Points:
    168
    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
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  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:
    11
    Trophy Points:
    168
    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
    
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice