From owner-freebsd-questions Tue Jun 23 02:18:35 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA29937 for freebsd-questions-outgoing; Tue, 23 Jun 1998 02:18:35 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from resnet.uoregon.edu (resnet.uoregon.edu [128.223.144.32]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA29827 for ; Tue, 23 Jun 1998 02:18:01 -0700 (PDT) (envelope-from dwhite@resnet.uoregon.edu) Received: from localhost (dwhite@localhost) by resnet.uoregon.edu (8.8.5/8.8.8) with SMTP id CAA01439; Tue, 23 Jun 1998 02:17:55 -0700 (PDT) (envelope-from dwhite@resnet.uoregon.edu) Date: Tue, 23 Jun 1998 02:17:54 -0700 (PDT) From: Doug White To: Bryce Newall cc: FreeBSD Questions List Subject: Re: FTP drop box In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 22 Jun 1998, Bryce Newall wrote: > The problem I'm running into is that when someone uploads a file, the file > is owned by "ftp", and not by the user whose account it's going into, so > the file doesn't count towards the user's quota. Consequently, outsiders > have been abusing this by uploading huge files and directories, probably > with the intent of filling up my filesystem. (Thankfully, /ftp is on its > own drive.) My question is, is there a way to get the OS to force > ownership on the file as soon as it's uploaded, so that outsiders cannot > upload more than will fit in the user's quota? Or does anyone have a > suggestion as to a better method of implementing these drop boxes than > what I'm currently doing? Sure, set the suid & sgid bits on the directories. This forces files created in them to aquire their owner/group and permissions. See `man 2 chmod' for info. Doug White | University of Oregon Internet: dwhite@resnet.uoregon.edu | Residence Networking Assistant http://gladstone.uoregon.edu/~dwhite | Computer Science Major To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message