Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 03 Apr 2008 12:02:46 -0400
From:      Victor Farah <victor@netmediaservices.net>
To:        Darren Spruell <phatbuckett@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: ftpd help
Message-ID:  <47F4FFA6.7080903@netmediaservices.net>
In-Reply-To: <839aec700804030853j5314b6c0j7fbcdf6d16858568@mail.gmail.com>
References:  <47F4F65E.3080007@netmediaservices.net> <839aec700804030853j5314b6c0j7fbcdf6d16858568@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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@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.
> 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47F4FFA6.7080903>