Start Directory PureFTPD

Hi Forum,

is it possible to define a start directory at server level like it's possible in most FTP Clients?
I mean a different directory than "DefaultHomeDirectory" from the pure-ftpd.conf.

For example the DefaultHomeDirectory is /media/nss/VOL01 but users log in to pureftpd start in /media/nss/VOL01/home/user. (Like it has been on the old netware ftp server)
I found nothing so far, but maybe I'm missing something, thanks in advance :)

  • Hi Forum,

    it seems PureFTPD has a feature which allows to "chdir" after the login.
    You have to edit the HomeDirectory string (important: the home of the UNIX tab!) for that, like described in the documentation:

    When Mimi will log in, two things will happen:
    - chroot("/home/mimi") so that Mimi can't see anything but her home directory.
    - chdir("public_html") so the session will start in the public_html
    directory. "cd .." is still allowed, though.
    That "url-style" handling is especially handy for FTP-only users (ie.
    without shell access) .

    If a user is chrooted with the /./ trick *and* belongs to the trusted group
    (-a) he *will* be chrooted, but he will have no ratio and will be allowed to
    access dot files.

    After setting this and refreshing the nam cache with "namconfig cache_refresh", the user looks like that:

    getent passwd test2

    Also you have to activate "DefaultHomeDirectoryServer" in the pureftpd.conf, to actually use the home directory set in the linux tab.

    Unfortunately it doesn't work. I guess the edir/lum integration does not understand this syntax. In the PureFTP Log you get this:
    Jun 18 15:34:10 oes1 pure-ftpd: (?@ [7335] [ERROR] Failed to get FDN of the user "test2" from UID <665>, error: 2

    I will appreciate any hints, If someone has more success :)