Subject: wu-ftpd-2.4.2-beta-11 on IRIX 6.2

From: [email-masked] (Andrew Stone)
Date: Wed, 22 May 1996 12:26:32 +0000

I am having problems with users being able to delete files they shouldn't
be able to.

The setup is:

guestgroup ftp in ftpaccess

Each user in group ftp has a chroot to their directory and is able to
upload HTML files, etc.

In each user directory are two files which basically describe the users
account for an index system. They both start with a '.' and can be updated
online using a web form; They are owned by root and group sys. The file
permissions are 600. I have also checked the ftpd processes and they are
running as the user.

The problem is that the users are able to delete these files and while this
is not a complete disaster, it is something I wouold like to prevent. I
can't use the 'delete' entry in ftpaccess because they must be able to
delete their own files.

Thankyou in advance
Andrew

----------
I don't have a signature

---

From: Mike Batchelor <[email-masked]>
Date: Wed, 22 May 1996 08:06:08 -0400 (EDT)

> can't use the 'delete' entry in ftpaccess because they must be able to

Any user can delete any file in a directory that is owned by that user. 
Delete priviledge requires only write priviledges in the directory,
regardless of who owns the file.  You will find that they cannot write to
the dot files owned by root, or rename or copy them, but they can delete
them because they own the directory the files live in.

What you need to do is create a directory owned by root, and put the dot
files in that directory, also owned by root.  The user won't be able to
delete the directory, even though the parent is owned by the user, because
they can't delete the files in the root-owned directory, and they can't
remove a directory unless it is empty.

-- 
  + + +      %%%%% Mike Batchelor % [email-masked] %%%%% A Division
 Capitol.Net %%%%%%%%%%% 301-306-9090 % V.34/ISDN %%%%%%%%%%%    of
     + + +   %% Serving Washington DC, No.VA, and Maryland %%   Criticom, Inc.

---

From: "W. James Showalter" <[email-masked]>
Date: Wed, 22 May 1996 09:50:24 -0400 (EDT)

Andrew,

As someone may have already told you the problem is that the ability to
delete a file is governed by the permissions and owner of the directory
which contains the file, not the file itself.  Change the owner and
permissions of the file to something other than the user(s).  If the user(s)
need to create files in this directory then make the directory writeable
by everyone.  To protect files in this directory from being removed, you
should set the owner of the file(s) to something other than the user and
use the sticky bit in the permissions.  The sticky bit set on a file will
only allow that file to be removed if the owner of the file also owns the
directory, regardless of the directory permissions. 

Jim