From owner-freebsd-security Fri Apr 9 18:11:45 1999 Delivered-To: freebsd-security@freebsd.org Received: from lariat.lariat.org (lariat.lariat.org [206.100.185.2]) by hub.freebsd.org (Postfix) with ESMTP id 98EEB14DD7 for ; Fri, 9 Apr 1999 18:11:43 -0700 (PDT) (envelope-from brett@lariat.org) Received: from mustang.lariat.org (IDENT:ppp0.lariat.org@lariat.lariat.org [206.100.185.2]) by lariat.lariat.org (8.9.3/8.9.3) with ESMTP id TAA01658 for ; Fri, 9 Apr 1999 19:09:26 -0600 (MDT) Message-Id: <4.2.0.32.19990409184654.045424d0@localhost> X-Sender: brett@localhost X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.0.32 (Beta) Date: Fri, 09 Apr 1999 19:09:23 -0600 To: security@freebsd.org From: Brett Glass Subject: Interesting problem: chowning files sent via FTP Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-freebsd-security@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Here's an interesting security problem that perhaps folks on this list can help with. I'm working with a client who does printing and computer graphics. He wants his customers to be able to upload graphics files via FTP and then allow an on-site operator to retrieve them. The customers should be able to FTP only into their own home directories (easy to implement via the built-in chrooting features of ftpd). The operator should be able to read and delete the files the users upload, preferably via NFS. But he shouldn't have full root privileges -- rather, he should have just enough privilege to work with those files. It seems to me that a good way to implement this would be to have the customers make their uploaded files group read/writable by a group of which the operator is the sole member. The operator would then mount /home via NFS, and would be granted only the privileges associated with his user ID and group. This would allow him to read and delete the files that the users had uploaded for him, but would not let him mess with the directory structure or with any files that hadn't been uploaded with the right modes or ownership. There are two problems, though. First of all, it appears that FTP doesn't have a built-in way of setting group ownership of an uploaded file. (It does let you set the UMASK, but there's no obvious way to say which group "owns" the file.) How could this be done by the FTP client? Can the customer give group ownership of the file to a group of which the user is not himself a member? Second, I need to set up NFS so that only the operator can mount /home from his one machine, and only with the privileges that would be accorded to him if he logged onto the machine himself. We want to make this as secure as possible, since the customers' data may be proprietary. So, we'll want to restrict NFS mounts to a specific IP address and authenticate as best we can. (If it's REALLY necessary, we may be able have the operator use FTP, but this is less desirable than letting him mount the directory.) Ideas on how to solve these two problems? Any other considerations I should be thinking of? --Brett Glass To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message