omarsdali 0 Report post Posted December 23, 2007 I have a quick question for you guys,I noticed that in CPanel, there is a cgi-bin folder under the www folder, and there is a cgi-bin folder that's created for every subdomain I have. What is this cgi-bin directory suppose to be used for ? And is it safe to just delete it ? Thanks in advance. Share this post Link to post Share on other sites
jlhaslip 4 Report post Posted December 23, 2007 the cgi-bin is a place to run scripts from.It takes up little or no space and there may be complications if you delete it, so until somebody comes along with further information, I would not delete it. Share this post Link to post Share on other sites
omarsdali 0 Report post Posted December 23, 2007 the cgi-bin is a place to run scripts from.What kind of scripts ? Can you give an example ? Share this post Link to post Share on other sites
jlhaslip 4 Report post Posted December 23, 2007 No, I can't because I code in PHP, but cgi is named as "Common Gateway Interface" and is often PERL scripting, AFAIK. CGI scripts have been replaced with ASP and php for most sites, depending on the scripting languages supported on the Server.Xisto allows php. Share this post Link to post Share on other sites
craz 0 Report post Posted December 23, 2007 omarsdali, the cgi-bin folder is for cgi scripts that you want to be use to be executed.You can get an idea of what it is here: https://en.wikipedia.org/wiki/Common_Gateway_Interface Share this post Link to post Share on other sites
frozen.fish 0 Report post Posted May 23, 2009 doh! what happens if i accidentally deleted that folder? it doesnt seem to have any contents, does it? Share this post Link to post Share on other sites
k_nitin_r 8 Report post Posted May 23, 2009 Hi!A CGI script is just like a normal script, except that it is called using the Common Gateway Interface. The use of CGI is no longer recommended because it creates a separate Operating System process for handling a request.A previous poster to this thread mentions about the use of Perl to create CGI scripts, but you can use just about any scripting language - you can even use PHP or Shell script! :-)The purpose of the CGI script folder is that you can grant executable privileges to these scripts but can leave them as read-only. This helps achieve a higher level of security as a user can't abuse the system by uploading their own scripts and injecting code to call their scripts. The basic idea is that you shouldn't grant executable privileges wherever you've got write privileges and vice-versa.Regards,Nitin Reddy Share this post Link to post Share on other sites
frozen.fish 0 Report post Posted May 23, 2009 Hi!A CGI script is just like a normal script, except that it is called using the Common Gateway Interface. The use of CGI is no longer recommended because it creates a separate Operating System process for handling a request.A previous poster to this thread mentions about the use of Perl to create CGI scripts, but you can use just about any scripting language - you can even use PHP or Shell script! :-)The purpose of the CGI script folder is that you can grant executable privileges to these scripts but can leave them as read-only. This helps achieve a higher level of security as a user can't abuse the system by uploading their own scripts and injecting code to call their scripts. The basic idea is that you shouldn't grant executable privileges wherever you've got write privileges and vice-versa.Regards,Nitin Reddy So it is safe to delete it right? is it really empty? the cgi-bin folder for the add-on domains? i can see the one for the main domain has contents in it.cause i deleted mine via FTP and checked the trash bin, i dont think it will be in trash bin when you deleted it via FTP.. Share this post Link to post Share on other sites
iGuest 3 Report post Posted November 25, 2009 My site now says Opps! this link appears to be brokenWhat Is The Cgi-bin Folder Used For ?I'm in the process of putting up my first site. Using MattieBlaze for Hosting and FileZilla as my FTP Client. Problem is when I opened the FTP Interface I deleted too many items on the lower right hand screen, things I thought were unrelated to the site itself. Now when I type in the URL I get "Opps this link appears to be broken". Error HTTP 404. Please help, this is nuts. It's my first site. Ralph -reply by Ralph Share this post Link to post Share on other sites
networker 0 Report post Posted December 28, 2009 The purpose of the CGI script folder is that you can grant executable privileges to these scripts but can leave them as read-only. This helps achieve a higher level of security as a user can't abuse the system by uploading their own scripts and injecting code to call their scripts. The basic idea is that you shouldn't grant executable privileges wherever you've got write privileges and vice-versa.Somehow I've never used the CGI folder or had any use for it. The thing is I've always set read/write permissionsin c-panel anyway(for example 0777 for full permissions) , which appears to be the same thing anyway,without needing a CGI folder. Also, if somebody could hack into your system why couldn't they just delete the contents of the CGI folder anyway? Perhaps perl users would know more and have the full answers. Share this post Link to post Share on other sites
nolan 0 Report post Posted December 28, 2009 This isn't entirely accurate. Some servers can be configured to use a pool of CGI processes to pass requests to, meaning a process is not started anew for each request. Furthermore, 'cgi-bin' is just a folder. It can be configured to have any other name and serve the same purpose. -Certain- scripts are traditionally placed inside of the conventional 'cgi-bin' folder in order to use the Common Gateway Interface (what CGI stands for) to communicate with executables on the host system (or, as I've mentioned, pooled processes). Typically, however, it's better to rely on a module to get the work done for you, or to pass instructions using a system API.I hope that clarifies. The use of CGI is no longer recommended because it creates a separate Operating System process for handling a request. Share this post Link to post Share on other sites
Quatrux 4 Report post Posted December 29, 2009 To answer the question, I wouldn't bother to delete it, it doesn't take any space and besides, I think it will be created again after some time automatically if you'll be playing with CPanel for example by doing something.. Share this post Link to post Share on other sites
iGuest 3 Report post Posted April 16, 2010 Oops there seems to be an error (404 Error Code)What Is The Cgi-bin Folder Used For ? A 404 is a page not found error code that the server automatically defaults to if it can't find an index. Upload, or replace the page in question with an index.Html file. You don't even have to put anything on it, but if you're planning on visitors, or even get them already it may be smart to put a page under construction banner up. Sounds like a GoDaddy default 404, so you can ftp the file or use file manager on the GoDaddy website to upload with the built in utility.-reply by SoliHost Share this post Link to post Share on other sites
iGuest 3 Report post Posted March 16, 2014 You can delete it if your not planning on using it. Share this post Link to post Share on other sites