Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Oct 2001 02:27:21 +0300
From:      Giorgos Keramidas <charon@labs.gr>
To:        BSD Freak <bsd-freak@mbox.com.au>
Cc:        FreeBSD Questions <freebsd-questions@FreeBSD.ORG>
Subject:   Re: /etc/ftpchroot doesn't work
Message-ID:  <20011015022721.B61548@hades.hell.gr>
In-Reply-To: <12a6aac12a51cb.12a51cb12a6aac@mbox.com.au>
References:  <12a6aac12a51cb.12a51cb12a6aac@mbox.com.au>

next in thread | previous in thread | raw e-mail | index | archive | help
BSD Freak <bsd-freak@mbox.com.au> wrote:
> Hi All....
> 
> 
> I have created the file /etc/ftpchroot andd added ftp users to it, is 
> there anything else I need to do to get it working? It seems that users 
> can still go anywhere within the file system even when their username 
> is in this file....

How do you define 'can still go anywhere'?

Here's a test I did a few moments ago without having a ftpchroot file:

   1  hades % cat /etc/ftpchroot
   2  cat: /etc/ftpchroot: No such file or directory
   3  hades % ftp localhost
   4  Connected to hades.
   5  220 hades.hell.gr FTP server (Version 6.00LS) ready.
   6  Name (localhost:charon): charon
   7  331 Password required for charon.
   8  Password: ********
   9  230 User charon logged in.
  10  Remote system type is UNIX.
  11  Using binary mode to transfer files.
  12  ftp> pwd
  13  257 "/home/charon" is current directory.
  14  ftp> bye
  15  221 Goodbye.

In line 2 you can see that there is no ftpchroot file.

In line 13 the home directory of `charon' is printed as
"/home/charon", which is the real home directory of `charon'
on this machine.

Now let's try with an `ftpchroot' file in place.

   1  hades % cat /etc/ftpchroot
   2  charon
   3  hades % ftp hades
   4  Connected to hades.
   5  220 hades.hell.gr FTP server (Version 6.00LS) ready.
   6  Name (hades:charon): charon
   7  331 Password required for charon.
   8  Password:
   9  230 User charon logged in, access restrictions apply.
  10  Remote system type is UNIX.
  11  Using binary mode to transfer files.
  12  ftp> pwd
  13  257 "/" is current directory.
  14  ftp> bye
  15  221 Goodbye.

Note the different output in lines 1-3 and line 14.

-giorgos

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011015022721.B61548>