Should I delete the cgi-bin folder in a subdomain I just created?

SubdomainCgi Bin

Subdomain Problem Overview


Using cpanel on my hosting account, I created a subdomain - e.g. www.clothing.mysite.com

A cgi-bin folder was automatically created in the directory for clothing.mysite.com. Do I need it? I'm only using the subdomain to install wordpress on it. I don't really understand what the cgi-bin folder is for and I'm happy to leave it if it doesn't harm anything. Any thoughts?

Subdomain Solutions


Solution 1 - Subdomain

cgi-bin historically was the only place where executable or script code (binaries, shell scripts, etc.) could be stored. It is mostly a historic relic since most hosts allow execution of scripts from anywhere.

Solution 2 - Subdomain

You can safely delete it. "cgi-bin" is hardly ever used these days.

Solution 3 - Subdomain

You can safely delete "cgi-bin" folder, it's hardly ever used nowadays

Also beware that when your server got some malware scripts scans different folders and then hides on folders like cgi-bin because they rarely are checked now.

I even wrote a script before that "monitors" different folders in my server and alerts me if it found different scripts in there on my personal and clients servers too.

Solution 4 - Subdomain

I haven't seen it mentioned but it might also be worth noting that since cgi-bin is traditionally used to execute scripts, some hosting providers might require you to edit your .htaccess file if you wish to execute scripts outside cgi-bin (same is true if you deleted your cgi-bin).

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMargoView Question on Stackoverflow
Solution 1 - SubdomainDavid PfefferView Answer on Stackoverflow
Solution 2 - SubdomainjanmoesenView Answer on Stackoverflow
Solution 3 - SubdomainfedmichView Answer on Stackoverflow
Solution 4 - SubdomainoliviaisarobotView Answer on Stackoverflow