Subject: Not so anonymous ftp

From: [email-masked] (Janice Lang)
Date: Tue, 9 May 1995 08:00:48 -0400

I have attempted to use the guestgroup facility in wu-ftpd running on solaris
2.4.  I have set up the user as a guest in the ftpaccess file.  I have created
a 'real account' for the user as well as an account within the ftp group and
passwd files.  When I attempt to log in as that user, I get the following error:

        550 Can't set group privileges

I had a suggestion that perhaps the directory before or after the /./ 
doesn't exist but I have ensured that it does.  The suggestion also included 
the possibility that I don't have the /./ in the password file but I have 
ensured that this is also not the case.  

Also I had a suggestion that perhaps my permissions are not set correctly.  I
have reviewed them and think that they are correct but perhaps they are not.  

I will attach the relevant part of my ftpaccess file, my passwd entry, and a 
directory listing.  If anybody has any more suggestions, I would greatly
appreciate hearing them. 

ftpaccess file:

        class local real *       
        class anon anonymous *
        class jht guest *
 
        limit anon 25 Any              /apps/wu-ftpd-2.4/msgs/msg.toomany
 
        guestgroup jht
         
        loginfails 3

/etc/passwd file entry:

   jht:x:202:202:Guest FTP Account:/home/ftp/pub/./home/ftp/pub/jht:/bin/false

directory listing:
/
drwxr-xr-x  16 root     root         512 May  5 11:27 home

./home
dr-xr-xr-x   9 root     other        512 May  9 08:49 ftp  

./ftp
dr-xr-xr-x   9 root     other        512 May  9 08:45 .                         
drwxr-xr-x  16 root     root         512 May  5 11:27 ..
d--x--x--x   2 root     other        512 Apr  3 09:51 bin
d--x--x--x   2 root     other        512 Apr  3 09:27 dev
d--x--x--x   2 root     other        512 Mar 21 11:48 devices
-rw-r--r--   1 root     other          0 May  9 08:45 dir.txt
d--x--x--x   2 root     other        512 Apr 28 15:56 etc
dr-xr-xr-x   2 root     other        512 Mar 20 11:09 msgs
drwxrwxrwx   7 root     other        512 May  8 14:21 pub
d--x--x--x   3 root     other        512 Apr  3 10:57 usr      

./pub:
total 16                                                                        
drwxrwxrwx   7 root     other        512 May  8 14:21 .
dr-xr-xr-x   9 root     other        512 May  9 08:45 ..
drwxr-xr-x   2 root     other        512 May  8 14:16 docs
d-wx-wx-wx   2 root     other        512 May  8 14:10 incoming
drwxr-xr-x   2 ftp      jht          512 May  8 14:22 jht
drwxrwxr-x   5 ftp      ftp         1536 May  8 21:10 stratis
drwxr-xr-x   5 root     other        512 May  8 14:12 utils  

Thanks in advance,
Janice Lang
BDM Federal Inc.
NASA IVV Facility
Fairmont WV 26505

---

From: [email-masked] (Dave Wolfe)
Date: Tue, 9 May 1995 08:43:37 -0500 (CDT)

[ Janice Lang writes: ]
>    jht:x:202:202:Guest FTP Account:/home/ftp/pub/./home/ftp/pub/jht:/bin/false

[ I wrote: ]
| 1)  the directory after the "/./" in the home directory specified in
                    ^^^^^^^^^^^^^^^
|     /etc/passwd doesn't exist in the chroot environment and thus wu-ftpd
                                ^^^^^^^^^^^^^^^^^^^^^^^^^
|     can't chdir to it,

Once wu-ftpd chroots (change root), the directory specified in the
chroot call becomes the root, i.e. "/", thus nothing above that level is
visible. Your home directory specification causes wu to chroot to
/home/ftp/pub, which leaves only the files and subdirectories of pub
visible. Since there is no directory named "home" there, it cannot chdir
and the guest login fails. Try "/home/ftp/./pub/jht".

-- 
 Dave Wolfe    *Not a spokesman for Motorola*  (512) 891-3246
 Motorola MMTG  6501 Wm. Cannon Dr. W. OE112  Austin  TX  78735-8598