how to change ftp root for single user

Discussion in 'Tips/Tricks/Mods' started by radim_h, Jun 26, 2008.

  1. radim_h

    radim_h Member

    Helo,
    i need to change one user (or should be all users in the domain)
    to log directly under /web directory

    i know there is solution editing proftpd.ini file
    DefaultRoot ~
    to
    DefaultRoot ~/web

    but i'd like to change the root just for single user (or it should be whole domain) and not affect the others

    if that is not possbile
    can i createsomehow ftp user not depending on ISPC ??
     
    Last edited: Jun 26, 2008
  2. falko

    falko Super Moderator

    That's not possible.

    Yes, you can add a normal system user (with the useradd command) and make the web directory his home directory.
     
  3. sirrus

    sirrus HowtoForge Supporter

    FTP user path

    Why is that impossible. You can change the user home directory in /etc/passwd.

    Or is there a good reason not to not do that?

    Regards,
    Andreas
     
  4. falko

    falko Super Moderator

    Yes, but ISPConfig would overwrite your changes.
     
  5. sirrus

    sirrus HowtoForge Supporter

    Ftp

    There is no way to create FTP only users in ISPconfig2? And there is no development on that in the trunk version?

    If not - when will ISPconfig3s stable enough to be used? There is an ftp only...
     
  6. falko

    falko Super Moderator

    Right.

    ISPConfig 3 is stable since version 3.0.1.
     
  7. Whitenoise

    Whitenoise New Member

    You can not modify the DefaultRoot for a single user but you can change DefaultChdir for a group. This will login that user into web but he will still be able to get into its parent folder.

    Try this:

    1. get the group that user belongs to
    2. open /etc/proftpd_ispconfig.conf
    3. after

    add

    where usergroup is the group of your FTP user.

    4. restart proftpd
    5. you will have to modify the master ispconfig proftpd config template to have this permanent, otherwise proftpd_ispconfig.conf will be reseted as soon as you'll add a new ftp account



    Now only that user will chdir into web after login. I tested it on the fly and it seems to work. Correct me if I'm wrong.
     

Share This Page