ftpd help

Darren Spruell phatbuckett at gmail.com
Thu Apr 3 15:53:56 UTC 2008

On Thu, Apr 3, 2008 at 8:23 AM, Victor Farah
<victor at netmediaservices.net> wrote:
> Hey
>         I have a default install of freebsd 6.2, and I enable ftpd in inetd.
> That all works nicely, I add a user to the system that needs to access ONLY
> two directories that are in two different places.
>  For example: /usr/local/www/dir1 and /usr/local/www/dir2/
>  There are many directories in /usr/local/www/ that this person SHOULD not
> have access too.  I also made this person a home directory:
> /usr/home/personX/.  I then made the symlinks to the two directories they
> need to access.  After all that setup I went into my /etc/ftpchroot file and
> added the following line:
>  personX
>  saved and I try to log on to test to see if it is locked in the home
> directory but has access to the two other directories they need.
>  Does work, is there anyway to do this with the default ftpd package that
> comes with this?

If you're attempting to restrict this FTP user to their home
directory, then symlinks to directories outside of their home
directory won't be accessible; this is the nature of chroot. You could
create those directories in that user's home directory and create
symlinks to those directories in the web directories (the opposite of
what you have) and that might work how you want. If the permissions on
your user's home directory are restricted you'd probably have to
modify permissions so that the web user could access them.

Darren Spruell
phatbuckett at gmail.com

More information about the freebsd-questions mailing list