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.

Remove "public_html" from default FTP Account path

Discussion in 'User Experience' started by simple_joe, May 13, 2015.

  1. simple_joe

    simple_joe Member

    Joined:
    Aug 5, 2010
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Hello, my users don't want their FTP folders to be in the publicly accessible www folder, so in the past I've been able to remove the "public_html" from the default FTP directory path (when a user creates a new FTP Account) by editing this file:
    /usr/local/cpanel/base/frontend/x3/js2-min/ftp/accounts.js

    But I just updated cPanel today and now this edit no longer works. Any ideas how I could still achieve this?

    ps: if helpful, the original thread where I got solution that no longer seems to work is here:
    https://forums.cpanel.net/threads/customizing-the-directory-path-for-ftp-users.162002
     
    #1 simple_joe, May 13, 2015
    Last edited: May 13, 2015
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    Have you considered disabling FTP access for the default account and simply requiring virtual FTP accounts for all users? Documentation on this is available at:

    How to Deny FTP Access

    Thank you.
     
  3. simple_joe

    simple_joe Member

    Joined:
    Aug 5, 2010
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Hi, the default account is used by customers to navigate to the other FTP Accounts setup in cPanel, so I need to leave that enabled.

    Essentially, If I could figure out which file cpanel is using when creating the accounts, I should be good to go. Apparently it is no longer using usr/local/cpanel/base/frontend/x3/js2-min/ftp/accounts.js so does anyone know which file it uses now?

    thanks,
    Joseph
     
  4. simple_joe

    simple_joe Member

    Joined:
    Aug 5, 2010
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    1
    Well I figured out that in version 11.48.4, I was able to edit /usr/local/cpanel/base/frontend/x3/ftp/list_ftp.tt to remove the onchange="suggest_homedir()" and it no longer fills in "public_html" for the FTP Account path. Of course I made a backup and tested it within my own config to make sure all still ran smooth on my particular server.

    Just a note: I really think cPanel should stop assigning all those FTP Accounts to be subfolders of the WWW directory, which makes them publicly accessible by default.

    hope this helps
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    I am happy to see the issue is now resolved. Thank you for updating us with the outcome. Note you can open a feature request for the suggested change via:

    Submit A Feature Request

    Thank you.
     
Loading...

Share This Page