Results 1 to 8 of 8

Thread: Changing the default FTP directory to public_html

  1. #1
    Registered Member
    Join Date
    Dec 2012
    Posts
    6
    cPanel/WHM Access Level

    Root Administrator

    Default Changing the default FTP directory to public_html

    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-...ers-76155.html

  2. #2
    Registered Member
    Join Date
    Dec 2012
    Posts
    6
    cPanel/WHM Access Level

    Root Administrator

    Default Re: Changing the default FTP directory to public_html

    Not possible?

  3. #3
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    11,251
    cPanel/WHM Access Level

    Root Administrator

    Default Re: Changing the default FTP directory to public_html

    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.

  4. #4
    Registered Member
    Join Date
    Dec 2012
    Posts
    6
    cPanel/WHM Access Level

    Root Administrator

    Default Re: Changing the default FTP directory to public_html

    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. #5
    Registered Member
    Join Date
    Dec 2012
    Posts
    6
    cPanel/WHM Access Level

    Root Administrator

    Default Re: Changing the default FTP directory to public_html

    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. #6
    Registered Member Astral God's Avatar
    Join Date
    Sep 2010
    Location
    127.0.0.1
    Posts
    180
    cPanel/WHM Access Level

    Root Administrator

    Default

    Is there any chance to do this with PureFTPd ?

    Thanks.

  7. #7
    Registered Member
    Join Date
    Dec 2012
    Posts
    6
    cPanel/WHM Access Level

    Root Administrator

    Default Re: Changing the default FTP directory to public_html

    Pureftp has something similar.
    chdir
    rootdir
    but I'm not sure how it gets implemented for all users.

  8. #8
    Registered Member
    Join Date
    Mar 2007
    Posts
    143

    Default Re: Changing the default FTP directory to public_html

    Quote Originally Posted by Astral God View Post
    Is there any chance to do this with PureFTPd ?
    If anyone figures out how to do this, please share.

Similar Threads

  1. Replies: 7
    Last Post: 03-29-2014, 12:43 AM
  2. How to set /public_html/ default directory
    By Galanthus in forum cPanel & WHM Discussions
    Replies: 5
    Last Post: 11-11-2013, 07:33 AM
  3. changing users public_html directory
    By anand in forum cPanel & WHM Discussions
    Replies: 4
    Last Post: 06-07-2010, 02:20 PM
  4. Replies: 5
    Last Post: 06-08-2006, 11:08 AM
  5. Default HTML directory (public_html)
    By Lufa in forum cPanel & WHM Discussions
    Replies: 4
    Last Post: 09-16-2004, 07:18 PM
bargain