Subject: Restricting user to one directory

From: Matt Maier <[email-masked]>
Date: Tue, 09 Apr 1996 13:41:04 -0400

I'm new to this list and would like to know what is the correct/best
solution to the following scenario. I need to setup FTP for several
customers. I want to restrict what they see. (they all need to see different
things) A cron job will run several times a day to place relevent files  (as
symlinks) into the users' directories. Should I use guestgroup, chroot each
customer to their home directory, or some other method?

thanks in advance
matt

---
Matt Maier - [email-masked] - [email-masked]
USA Today Information Network - http://www.usatoday.com

---

From: "W. James Showalter" <[email-masked]>
Date: Tue, 9 Apr 1996 15:33:31 -0400 (EDT)

Matt,

There are probably several ways to do it.  If you use the guestgroup and
chroot() command, you cannot do symlinks since the link would point
somewhere outside of the new root.  And you can't do hardlinks across
files system.  If the files are small enough, just copy them to each
guest user.  There is a way of making what looks like a hard link across a
file system.  It is known as a loopback mount and is basically a mount of
a directory into another directory. In fact, the loopback file system
(lofs) was intended for use with chroot().  The man page on lofs gives a
good description of this.  This is how we provide access to various
directories on our machine to anonymous ftp users without having to
reproduce each directory. 

Another possibility is to use ftpgroups and put the files in directories
owned by each group.  Then just issue the groupname and password to whoever
needs to get access to the files.  This would be via anonymous ftp.

Jim