Subject: ftpaccess

From: Pierrette Barbaresco <[email-masked]>
Date: Thu, 18 Feb 1999 18:06:01 +0100 (MET)

Hi,

When updating wu-ftpd-2.4.2 from beta-14 to beta-18 on Solaris 2.5,
I found some problems.

I use ftpaccess upload feature to allow upload for guestgroup and to modify
uploaded file permissions .

upload  /users/ftpanon/ftp      *       no
upload  /users/ftpanon/ftp      /trav   yes     essaif  sysmaint        0660    nodirs
upload  /users/ftpanon/ftp/*    /trav   yes     essaif  sysmaint        0660    nodirs

Passwd guest entry :

essaif:x:1367:112::/users/ftpanon/ftp/./trav:/etc/ftponly

The problem seems to come from realpath.c :

realpath.c ( beta 14 ) last two lines 

    strcpy(result, workpath);
    return (result);

realpath.c ( beta 18 ) last three lines

    (void)strncpy(result, namebuf, MAXPATHLEN - 1);  namebuf is empty
    result[MAXPATHLEN - 1] = '\0';
    return (result);

With wu-ftpd-2.4.2-beta-18-vr14 permissions are not modified.

-- 
------------------------------------------------------------------------------
Pierrette Barbaresco              tel:  05 61 36 60 08          
CICT				  
118, route de Narbonne		  Email: [email-masked]     
31062 Toulouse Cedex		  
------------------------------------------------------------------------------

---

From: Gregory A Lundberg <[email-masked]>
Date: Thu, 18 Feb 1999 12:29:12 -0500 (EST)

On Thu, 18 Feb 1999, Pierrette Barbaresco wrote:

> I use ftpaccess upload feature to allow upload for guestgroup and to
> modify uploaded file permissions .
> 

I'll leave off your third rule since it never worked on any version of
wu-ftpd.  It'll work with VR, but that's another issue.

With a VR version, try one of the two methods instead:

upload relative /trav *       no
upload relative /trav /trav   yes essaif sysmaint 0660 nodirs

-or-

upload /users/ftpanon/ftp/trav *       no
upload /users/ftpanon/ftp/trav /trav   essaif sysmaint 0660 nodirs

I recommend the second form.  The first is there to support
BeroFTPD/NEWVIRT and can lead to ambiuous upload rules.

The problem as I saw it was the syntax

upload <root> <dir> ...

Did <root> mean chroot-point?  If so, it's ambiguous.  I couldn't have
different rules for different users in the same chroot-area.

Does <root> mean home-dir?  Is so, it needed to be relative to the
chroot-point and that's ambiguous too.  I couldn't use different rules on
home directories with the same name in different chroot-areas.

So I push everything through realpath() and add (unless you say relative)
the chroot directory.  This gives a nice, canonical name which can be
unambiguously matched without need to worry about chroot, symlinks, etc.
In fact, the only way to fool it, as far as I can see, is by hardlinked
directories (if even then).

I challenge that the upload clauses you had actually worked pre-VR, or if
they did, this user was a special case or you never checked user-to-user
interaction against the upload clauses.  I may be wrong, but I could never
get upload to work correctly in anything but the most trivial cases.  I
also never went back through the academ betas to try to figure out where
upload was broken, assuming it ever worked, so I guess it's possible you
were running an old enough version that it actually did work for you.

-- 

Gregory A Lundberg              Senior Partner, VRnet Company
1441 Elmdale Drive              [email-masked]
Kettering, OH 45409-1615 USA    1-800-809-2195

---

From: [email-masked]
Date: Fri, 19 Feb 1999 10:05:28 +0100

Hello,

> When updating wu-ftpd-2.4.2 from beta-14 to beta-18 on Solaris 2.5,

I also have found one problem updating from beta-18 to beta-18 VR releases :
the compression/tar don't work. Now, I have found the error : in ftpaccess,
I have change from 

class     all  real,anonymous  *
compress  yes  local remote
tar       yes  local remote

to

class     all  real,anonymous  *
compress  yes  all
tar       yes  all

Now, the compression/tar work OK.

Good day.

		Olivier

-- 
    . __    . ___  __.  | Olivier Bornet email : [email-masked]
   / /  `  / /  / /  /  | IDIAP                 phone : +41-27-721'77'40
  / /   / / /--/ /--'   | CP 592                  fax : +41-27-721'77'12
 / /__.' / /  / /       | CH-1920 Martigny   http://www.idiap.ch/~bornet
                        | Get my PGP-key :  "finger [email-masked]"
Swiss Ice Hockey Results:    http://www.idiap.ch/cgi-bin/SportWeb.cgi?-e