Search code examples
webcpanelcgi-bin

How can i prevent cgi-bin of being automatically created?


A cgi-bin folder was automatically created in the directory for my site. I don't use that folder at all because I don't need it. I don't know how to permamently delete it.

How can I achieve that? It creates itself every now and then.


Solution

  • If using cPanel, edit /etc/bashrc and comment out these lines:

    if [ ! -e ~/public_html/cgi-bin ]; then
    mkdir -p ~/public_html/cgi-bin
    fi
    

    You may need your administrator or web host to do this if you don't have access.