Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Changing the default FTP directory to public_html

Discussion in 'General Discussion' started by mpascal, Dec 31, 2012.

  1. mpascal

    mpascal Member

    Joined:
    Dec 30, 2012
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I'm planning to migrate 400 sites from a defunct proprietary control panel to cpanel.
    My users are used to FTP and land straight into the public_html directory.
    But with cpanel you land into the user's home directory and then you have to click on public_html to get to the public_html directory.

    My users aren't very sophisticated and I worry they'll freak out when they see all that unrecognizable "stuff" in their home directory. Even worse they may start deleting it.

    How can I set it up so the default ftp directory is public_html ?

    I found something but it applies only to one group not all of them.
    vim /etc/proftpd.conf

    changed this:

    DefaultRoot ~ !group_name
    DefaultChdir ~/public_html !group_name

    to this:

    DefaultRoot ~ !group_name
    DefaultRoot / group_name
    DefaultChdir ~/public_html

    [root@host ~]# /etc/init.d/proftpd restart

    I see that the question has been asked before several times but never answered.
    http://forums.cpanel.net/f34/change-default-ftp-home-directory-users-76155.html
     
  2. mpascal

    mpascal Member

    Joined:
    Dec 30, 2012
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Not possible?
     
  3. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    16,311
    Likes Received:
    393
    Trophy Points:
    583
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    TBH, you can set the directory you log into with settings in your FTP client. If one of your clients generates a Full Website backup, its placed outside the public_html directory. How will they get to it?

    I think the proper answer is to educate your users. If you've got 400 users not sophisticated enough to know to click up one directory, I can't imagine the work load you have when they're asking to update a wordpress or add a new theme to it, create an email account, etc.

    I'm sure this answer isn't what you're looking for, sorry about that.

    For as long as I've been a Hosting Provider I've always tried to make sure my users knew what they were doing as best I could. One of the ways I do that is to provide all errors pages, robots.txt, favicon and more in every new account created. I also add a text file that explains these added files and how to edit or change them with their own, and why they are here.

    There may indeed be a way to get what you seek, I can't help with that. But I wanted to give you my 2 cents all the same. :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. mpascal

    mpascal Member

    Joined:
    Dec 30, 2012
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    There is no reason to land on the home directory.
    99% of the people have nothing to do there.
    On my other server ftp lands on the public_html directory and it is still possible to switch to the home directory.
    And no I don't want to explain to 400 people with 20 different FTP clients that this extra step is actually better for them.
    This is enough of a turnoff to not use cpanel at all.
    In fact when I tried to migrate 3 years ago and the support of the new server told me it wouldn't be possible with cpanel I thought they were being lazy and incompetent and I aborted the migration.
    I'd gladly pay to override this.
     
  5. mpascal

    mpascal Member

    Joined:
    Dec 30, 2012
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Figured it out, thanks to ProFTPD mini-HOWTO - Configuration Tricks
    Went to /etc/proftpd.conf
    added these lines
    DefaultRoot /home/%u
    DefaultChdir /home/%u/public_html



    And then restarted with
    /etc/init.d/proftpd restart
     
  6. Astral God

    Astral God Well-Known Member

    Joined:
    Sep 27, 2010
    Messages:
    180
    Likes Received:
    0
    Trophy Points:
    66
    Location:
    127.0.0.1
    cPanel Access Level:
    Root Administrator
    Is there any chance to do this with PureFTPd ?

    Thanks.
     
  7. mpascal

    mpascal Member

    Joined:
    Dec 30, 2012
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Pureftp has something similar.
    chdir
    rootdir
    but I'm not sure how it gets implemented for all users.
     
  8. texo

    texo Well-Known Member

    Joined:
    Mar 28, 2007
    Messages:
    144
    Likes Received:
    2
    Trophy Points:
    168
    If anyone figures out how to do this, please share.
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice