From nobody@FreeBSD.org  Wed Mar 19 16:47:22 2008
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id A97A8106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 19 Mar 2008 16:47:22 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 9F78D8FC22
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 19 Mar 2008 16:47:22 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.2/8.14.2) with ESMTP id m2JGlJBr026288
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 19 Mar 2008 16:47:19 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.2/8.14.1/Submit) id m2JGlJdg026287;
	Wed, 19 Mar 2008 16:47:19 GMT
	(envelope-from nobody)
Message-Id: <200803191647.m2JGlJdg026287@www.freebsd.org>
Date: Wed, 19 Mar 2008 16:47:19 GMT
From: Josh Webb <joshwebb@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: ftpd does interpret configuration files as documented
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         121871
>Category:       docs
>Synopsis:       ftpd does not interpret configuration files as documented
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 19 16:50:03 UTC 2008
>Closed-Date:    Wed Sep 01 10:54:45 UTC 2010
>Last-Modified:  Wed Sep 01 10:54:45 UTC 2010
>Originator:     Josh Webb
>Release:        7.0
>Organization:
>Environment:
FreeBSD 7.0-RELEASE #0: Sun Feb 24 10:35:36 UTC 2008
root@driscoll.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
I'm not sure if this is a problem with the documentation, ftpusers(5) and ftpd.conf(5), or with ftpd. According to the man pages, there should be three ways to chroot all ftp users to their home directories.

1) A line at the end of ftpusers:
* allow chroot
The documentation indicates that this should match all users not matched (and therefore denied access) in a previous line, allow them access to the server, and assign them to the chroot class, which defaults to chrooting them to their home directory.
In practice, the * is not interpreted, so it end up not matching any users. If I supply a specific user name, the user is blocked from ftp access, indicating the directive and class parts of the line are not being followed.

2) A single line in ftpchroot:
*
The documentation indicates that this should match all users and chroot them to their home directories (unless an alternative chroot cestination is specified in ftpd.conf).
In practice, the * is not interpreted, so it end up not matching any users. If I supply a specific user name, the user is chrooted correctly.

3) A single line in ftpd.conf:
chroot all %d
The documentation seems to indicate that this should match all users and chroot them to their home directories.
I have not been able to get any results from the chroot command in ftpd.conf
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-doc 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Thu Mar 20 08:01:15 UTC 2008 
Responsible-Changed-Why:  
This sounds like a documentation problem. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=121871 

From: Vadim Goncharov <vadim_nuclight@mail.ru>
To: Josh Webb <joshwebb@gmail.com>
Cc: bug-followup@freebsd.org
Subject: Re: conf/121871: ftpd does interpret configuration files as documented
Date: Thu, 20 Mar 2008 15:39:07 +0600

 Hi Josh Webb! 
 
 On Wed, 19 Mar 2008 16:47:19 GMT; Josh Webb <joshwebb@gmail.com> wrote:
 
 > 3) A single line in ftpd.conf:
 > chroot all %d
 > The documentation seems to indicate that this should match all users and chroot them to their home directories.
 > I have not been able to get any results from the chroot command in ftpd.conf
 
 May be you're trying to use ftpd.conf with ftpd(8), but actually there are TWO
 ftp daemons in base system, and ftpd.conf(5) man page is for lukemftpd(8).
 The latter is obtained from NetBSD and more featureful, but does not support
 sendfile(2).
 
 This can be not only documentation problem, but a buildworld config too, as
 about two daemons installed at the SAME time.
 
 -- 
 WBR, Vadim Goncharov. ICQ#166852181       mailto:vadim_nuclight@mail.ru
 [Moderator of RU.ANTI-ECOLOGY][FreeBSD][http://antigreen.org][LJ:/nuclight]

From: Josh Webb <joshwebb@gmail.com>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: conf/121871: ftpd does interpret configuration files as documented
Date: Thu, 20 Mar 2008 09:56:26 -0500

 Oops, I left out the "not" from "ftpd does NOT interpret configuration 
 files as documented". Obviously, interpreting the file as documented 
 would not be a bug.

From: Josh Webb <josh@jmwebb.net>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/121871: ftpd does interpret configuration files as documented
Date: Thu, 20 Mar 2008 10:18:20 -0500

 Yeah, looks like mostly a documentation problem.
 
 The ftpchroot(5) man page, which is also the ftpusers(5) man page, 
 indicates that it is for controlling ftpd(8). The ftpusers(5) man page 
 references ftpd.conf(5), which as Vadim Goncharov stated, is only used 
 by lukemftpd(8). If two ftp daemons are going to be included in the base 
 system, both of which use ftpchroot and ftpusers but parse them 
 differently, the man pages for those files should describe how they are 
 used by each of the two daemons.
 
 As a side note, it sounds like I can get the behavior I was looking for 
 by using lukemftpd, rather than ftpd.
State-Changed-From-To: open->closed 
State-Changed-By: maxim 
State-Changed-When: Wed Sep 1 10:52:36 UTC 2010 
State-Changed-Why:  
This is well-known mess with the different versions of ftpd 
in the base system.  There are already several opened PRs 
regarding this issue (e.g. docs/44519, docs/93785). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=121871 
>Unformatted:
