cmo

Member
Dec 20, 2013
16
0
1
cPanel Access Level
Root Administrator
Hi there,

1. I have removed the cgi-bin directory a number of times and it shows back up under public_html as soon I SSH back in as a user. I have unchecked "CGI Privilege" under Account Functions » Modify an Account, I have unchecked "CGI Access" under Packages » Edit a Package, I have unchecked everything with "CGI" in the name under Packages » Feature Manager.

2. I don't allow Anonymous FTP. Is it safe to remove the public_ftp directory under /root/cpanel3-skel? Is it OK to remove existing public_ftp directories from existing user accounts? Will it mysteriously show back up after deleting it like cgi-bin?

Thanks a bunch for your help!

- cmo
 

quietFinn

Well-Known Member
Feb 4, 2006
1,222
87
178
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
if [ ! -e ~/public_ftp ]; then
        mkdir -p ~/public_ftp
fi
That code checks if directories /home/CPANELUSERNAME/public_html/cgi_bin and /home/CPANELUSERNAME/public_ftp exist and if not creates them.

I suppose you could comment out those lines.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Hello :)

The "public_ftp" directory is not required, so you can delete it if you have no plans to use it. See the above post regarding the creation of that directory.

Thank you.