Subject: [154] Group Problems.....

From: Alex Deacon - NAIC <[email-masked]>
Date: Mon, 11 Jul 1994 16:44:47 -0700

Hello All,

I have run into a small error while setting up a group ftp account
using version 2.4.

1)I've added the following passwd entry

ds3proj:<passwd>:405:30:DS3 Project:/usr/local/ftpsutff/ds3proj/./pub:/etc/ftponly

2)Added a group to the /etc/group file called ftponly (gid=30)

3)Created the directories
     /usr/local/ftpsutff/ds3proj/{bin,etc,usr,pub,dev}

4) added  'guestgroup ftponly' to the ftpaccess file

5) added /etc/ftponly to /etc/shells

  I checked out the ftpd.c code and found that at line 1132 the value
of pw->pw_dir is usr/local/ftpstuff/ds3proj  so the chroot fails 'cuz
there is no usr/local/ftpstuff/ds3proj.  

if (chroot(pw->pw_dir) < 0 || chdir(++sp) < 0) {
      reply(550, "Can't set guest privileges.");
      goto bad;
}

When I change it to 

if (chroot("/usr/local/ftpstuff/ds3proj") < 0 || chdir(++sp) < 0) {
      reply(550, "Can't set guest privileges.");
      goto bad;
}

It works fine...any ideas?

Thanks!

Alex 
---------------------------------------------------------------------------
 Alex Deacon                            NAIC Email: [email-masked]
 Network Applications and               NAIC 800 #: 800-858-9947
   Information Center (NAIC)            NAIC Phone: 415-604-0600     	
 NASA Ames Research Center		
 M/S 204-100				Email: [email-masked]
 Moffett Field, CA 94035-1000           Phone: 415-604-0752
---------------------------------------------------------------------------