Subject: Problems with guestgroup in ftpaccess

From: Max Maklin <[email-masked]>
Date: Tue, 31 Jan 1995 08:22:03 -0500

I am trying to set up seperate area of file space for various customers
by utilizing the guestgroup command in ftpaccess.  The problem I am having
is that ls and dir do not return any data.

I am aware of the effects of the chroot() and the need of ls relative
to the home directory, but I can not seem to make it work.  Here is
some prototypical entries that describe my configuration:

<guest>:*:xxx:yyy:Guest Customer:/home/ftp/customer/<guest>/./.:/bin/true

I do not want the customer to be able to go up one level, thus the chroot()
argument is their home directory and I pass . to the chdir() command.  Is
this OK?  Do I need the .?  I have tried both ways and I am still placed
in the proper directory.

Now, the GID of guest is a unique group in /etc/group and I place this
group name as an argument to guestgroup keyword in ftpaccess.  In other
words, there exists a group with a GID of yyy in /etc/group and I use
this name in guestgroup keyword.  Is this OK?  Should all users have the
same GID and I create unique groups that I make guests members of them?
(Right now, my /etc/group has no members to them as I use the GID of these
groups as the login group of guest account).

Symptoms of this are as follows:

ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
226 Transfer complete.
ftp> pwd
257 "/" is current directory.
ftp>

Nothing!

If I take the group out of the guestgroup keyword

ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
total 5780
-r--r--r--  1 root     wheel         112 Jan 30 11:28 .welcome
-r--r--r--  1 root     wheel         333 Jan 30 11:28 .welcome.msg
d--x--x--x  2 root     wheel         512 Jan 30 14:22 bin
d--x--x--x  2 root     wheel         512 Jan 30 14:23 etc
-rw-rw-r--  1 3mcust   3mcust    5902466 Jan 18 16:10 phsrvd.z
226 Transfer complete.
ftp> pwd
257 "/home/ftp/pwrhse/3M" is current directory.
ftp>

The problem here is while I have the listing I need, the chroot() has
not been done and they can walk all over the file system right to root!
Not what I want.

I have tried both shared and static versions of ls and it does not make
a difference. 

Any insight would be greatly appreciated.

Max
-- 
Max Maklin                                                P.O. Box 9707 
Sr. Technical Analyst	                           3755 Riverside Drive
Cognos Incorporated                              Ottawa, Ontario CANADA
Internet: [email-masked]                 UUNet: [email-masked]