[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ftpd chroot



So my question is related to the ftpd chroot implementation. The
best way for me to ask is via an example.

the users homedir is "/home/test" with a symlink in it,
"/home/test/www -> /var/www/users/test"

/etc/login.conf snip:
        :ftp-chroot:\
        :ftp-dir=~:

That will drop the user into their home directory from homedir in
passwd. Now obviously when ftpd' in, chdir to "www" will _not_ work
due to chroot (all good).

Now take the following values in /etc/login.conf
        :ftp-chroot:\
        :ftp-dir=~/www:

Again, ftpd will drop me into a chroot, but this time will honor
the symlink, and it chroots in /home/test/www which is really
/var/www/users/test.

My question is: is that intended?

If so, I wonder if taking ftp-dir to another level might be possible.
For example :ftp-dir=/var/www/users/$LOGNAME:.

Opinions? Flames?

Thanks,
Okan

--