Subject: Re: dir command dumps core

From: [email-masked] (William L. Sebok)
Date: Tue, 4 Mar 1997 15:11:37 -0500 (EST)

From: Vidiot <[email-masked]> says:

> ftmsftp:x:5001:5000:Guest FTP account:/usr/export/ftms_releases/ftp/./ftms:/bin/false

> Here is the interesting part.  If I log in as ftmsftp, I get to where I am
> supposed to go, and that is ~ftp/ftms.  BUT, I am allowed to move up a
> directory into the parent of ~ftp/ftms.  Is this right?  I cannot cd out of
> the ~ftp area, but I can certainly leave ~ftp/ftms.

That is how it is supposed to work. The "/./" in the home directory path is
interpreted by the ftp daemon as "chroot to here".

Bill Sebok      Computer Software Manager, Univ. of Maryland, Astronomy
	Internet: [email-masked]	URL: http://www.astro.umd.edu/~wls/

---

From: Vidiot <[email-masked]>
Date: Tue, 4 Mar 1997 14:40:31 -0600 (CST)

Bill Sebok posted:

<From: Vidiot <[email-masked]> says:
<
<> ftmsftp:x:5001:5000:Guest FTP account:/usr/export/ftms_releases/ftp/./ftms:/bin/false
<
<> Here is the interesting part.  If I log in as ftmsftp, I get to where I am
<> supposed to go, and that is ~ftp/ftms.  BUT, I am allowed to move up a
<> directory into the parent of ~ftp/ftms.  Is this right?  I cannot cd out of
<> the ~ftp area, but I can certainly leave ~ftp/ftms.
<
<That is how it is supposed to work. The "/./" in the home directory path is
<interpreted by the ftp daemon as "chroot to here".

Correct.  It goes there just fine.  But chroot means that the location is
supposed to be the "root" of the user, but it isn't.  I'm able to cd into
the ~ftp root directory.

The chroot appears not to be working correctly in this case.

MB
-- 
System Administrator - Finnigan FT/MS - Madison WI. <URL:http://www.ftms.com/>
e-mail: [email-masked]
phone: (608) 273-8262 ext: 612  fax: (608) 273-8719
Visit - <URL:http://www.cdsnet.net/vidiot/>  (Your link to Star Trek and UPN)

---

From: Neil Readwin <[email-masked]>
Date: Tue, 4 Mar 1997 15:54:57 -0500 (EST)

On Tue, 4 Mar 1997, Vidiot wrote:
> <> /usr/export/ftms_releases/ftp/./ftms

> supposed to be the "root" of the user, but it isn't.  I'm able to cd into

Not so. ftpd splits the home directory into 2 parts around the "/./",
chdirs/chroots to the first then chdirs to the second. So when you login
you should be in /usr/export/ftms_releases/ftp/ftms and you should be
able to "cd .." exactly once. Neil.
-- 
 We just don't discuss that capability.  I can't tell you why we don't
 discuss it because then I'd be discussing it. -- Pete Williams

---

From: Vidiot <[email-masked]>
Date: Tue, 4 Mar 1997 16:48:29 -0600 (CST)

<Not so. ftpd splits the home directory into 2 parts around the "/./",
<chdirs/chroots to the first then chdirs to the second. So when you login
<you should be in /usr/export/ftms_releases/ftp/ftms and you should be
<able to "cd .." exactly once. Neil.

You are correct in that how I thought it would work, doesn't.  In my case
it doesn't matter if the user can cd up one directory and move around the
~ftp tree.

MB

---

From: Richard Couture <[email-masked]>
Date: Wed, 5 Mar 1997 12:29:24 -0800 (PST)

I am having a similar problem.  Mine will not chroot, and depending on who owns the tree that I
want to access, it may not even access.  
I am trying to create logins that can ONLY ftp and not telnet.  I also do not want these users
wandering around and seeing what other similar users have got.
I added    guestgroup ftpart   to ftpaccess file
I created a user called dell
I created in /home/artdept/dell (The home dir) a bin and etc dir.
dell is member or group ftpart
dell's shell is /bin/false
the passwd entry has    /home/artdept/dell/./incoming   in the home dir field
Dells home tree is owned by dell.artdept
when I ftp in as dell, I find myself in the home dir as opposed to the ~dell/incoming dir and I
can cd all the way to root (The REAL ROOT) 
Any ideas...  Running on Linux 2.0.0 with BETA12

Richard

-- 
The CoffeeNet (R)               The greatest coffee AND the world (R)
744 Harrison Street at 3rd         --->>> FREE e-mail and <<<---
San Francisco, CA 94107-1235   --->>> FREE personal WEB page! <<<---
Voice: (415) 495-7447          e-mail: [email-masked]