victor at netmediaservices.net
Thu Apr 3 16:43:07 UTC 2008
I've thought of that, but there are other users, using the same
directories he's using, I don't want move any directories around. There
has to be a way to chroot a user and then allow access to only specific
directories? I was looking at other ports but I wasn't sure as of yet I
wanted to see if there was a way with the default ftpd. If this is not
possible can anybody suggest GOOD ftp server ports that will allow for
this kind of file use, as in allow users to only see certain directories
of the admins choosing? Thanks
Darren Spruell wrote:
> On Thu, Apr 3, 2008 at 8:23 AM, Victor Farah
> <victor at netmediaservices.net> wrote:
>> 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:
>> 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.
More information about the freebsd-questions