The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Removing Directories

Discussion in 'General Discussion' started by cmo, Jan 6, 2014.

  1. cmo

    cmo Member

    Joined:
    Dec 20, 2013
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    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
     
  2. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    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.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  4. cmo

    cmo Member

    Joined:
    Dec 20, 2013
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thanks, quietFinn and Michael, that got it :)
     
Loading...

Share This Page