2

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.

Josip Ivic
  • 3,639
  • 9
  • 39
  • 57
  • I'm voting to close this question as off-topic because this is a webmastering question and should be moved to http://webmasters.stackexchange.com – MrWhite Apr 02 '16 at 21:34
  • Did you create the site (ie. cPanel account) through WHM? There is a "CGI Privilege" for each cPanel account that can be enabled/disabled through WHM - this might control the creation of the `cgi-bin` folder. – MrWhite Apr 02 '16 at 21:40

1 Answers1

2

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.

kainjow
  • 3,955
  • 1
  • 20
  • 17