Subject: allow user upload to private directory

From: [email-masked] (Daniel Fong)
Date: Wed, 7 Oct 1998 18:12:33 -0900 (GMT)

Hello,

I'm running Version wu-2.4(1) on a Solaris 2.4 machine. I created a new
user with the useradd command and now I want that user to be able to upload
files to a directory under /private. But, everytime I try and upload
something it says permission denied (Upload). I modified the ftpaccess so
that uploads are allowed to the private directory, but not luck.

Any ideas?

-dan

---

From: Gregory A Lundberg <[email-masked]>
Date: Thu, 8 Oct 1998 04:52:57 -0400 (EDT)

On Wed, 7 Oct 1998, Daniel Fong wrote:

> I'm running Version wu-2.4(1) on a Solaris 2.4 machine.

First .. get the current version.  2.4 is VERY old and shouldn't be used
unless you have no connection to any networks or don't care a bit about
security.  The current version is 2.4.2-beta-18

The location of the latest version of wu-ftpd can be found in the 
directory
 
      ftp://ftp.academ.com/pub/wu-ftpd/private/
 
You can't see the directory contents, so read the message informing you
of the actual filename to retrieve. It's there.
 
wu-ftpd Resource Center:  http://www.landfield.com/wu-ftpd/
wu-ftpd FAQ:              http://www.cetis.hvu.nl/~koos/wu-ftpd-faq.html
wu-ftpd list archive:     http://www.landfield.com/wu-ftpd/mail-archive/

> I created a new user with the useradd command and now I want that user
> to be able to upload files to a directory under /private. But,
> everytime I try and upload something it says permission denied
> (Upload). I modified the ftpaccess so that uploads are allowed to the
> private directory, but not luck.

Today's the day for upload questions.  Including my breaking it trying
something new.  Here's how upload works, at least for the first two
parameters:

upload <pwdir> <cwdir> ...

<pwdir> is matched against the users home directory.  This upload clause
ONLY applies to users who have the specified home.

<cwdir> is matched against the directory where the uploaded file will be
placed.  This can be a file glob .. and that's where most people go wrong.

Here's an example from my ftpaccess file.

---- 

# remember for wu-ftpd upload "what is not denied is allowed"

# I can't upload
upload /home/users/lundberg * no

# Except to a FILE in the /tmp directory
upload /home/users/lundberg /tmp yes nodirs

# Or in my own HOME
upload /home/users/lundberg /home/users/lundberg yes

# Or in a subdirectory of my HOME
upload /home/users/lundberg /home/users/lundberg/* yes

# Or to the anonymous FTP incoming directory
upload /home/users/lundberg /home/ftp/incoming yes vrnet vrnet 440 nodirs

# Anonymous users can't upload
upload /home/ftp * no

# Except to a FILE in the incoming area
upload /home/ftp /incoming yes vrnet vrnet 440 nodirs

# I'm using beta-18-vr8 so I can use globs on the <pwdir> ...

# None of my users can upload to the filesystem root, /bin or /etc
# Everyone is chroot'd to /home/users so this refers to the chroot area
upload /home/users/* / no
upload /home/users/* /bin no
upload /home/users/* /bin/* no
upload /home/users/* /etc no
upload /home/users/* /etc/* no

---- 

Net effect, my users and anonymous visitors can upload ONLY where I want.

And, with VR8 patches, I can even have the daemon stop my users uploading
into system areas without depending upon file and directory permissions.
Cool.  The only time they see 'permission denied' is if one user tries to
upload to another's home.  (Maybe someday I'll do a VR patch to deny even
that.  There's an old request for that, too.)

-- 

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