From owner-freebsd-questions@FreeBSD.ORG Tue Oct 7 14:30:56 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3B36E1065692 for ; Tue, 7 Oct 2008 14:30:56 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from QMTA10.emeryville.ca.mail.comcast.net (qmta10.emeryville.ca.mail.comcast.net [76.96.30.17]) by mx1.freebsd.org (Postfix) with ESMTP id 1D4FD8FC1C for ; Tue, 7 Oct 2008 14:30:55 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from OMTA01.emeryville.ca.mail.comcast.net ([76.96.30.11]) by QMTA10.emeryville.ca.mail.comcast.net with comcast id PpDb1a01u0EPchoAAqWvo5; Tue, 07 Oct 2008 14:30:55 +0000 Received: from koitsu.dyndns.org ([69.181.141.110]) by OMTA01.emeryville.ca.mail.comcast.net with comcast id PqWu1a0022P6wsM8MqWub8; Tue, 07 Oct 2008 14:30:54 +0000 X-Authority-Analysis: v=1.0 c=1 a=aS1l5-Fw-roA:10 a=QycZ5dHgAAAA:8 a=vKCX9tddm7V0oAh7IMkA:9 a=bcR5skymj0Pp4bA2RYYA:7 a=opWDE3neWxJSj9_lXeCngRjhjAkA:4 a=EoioJ0NPDVgA:10 a=LY0hPdMaydYA:10 Received: by icarus.home.lan (Postfix, from userid 1000) id F1319C9419; Tue, 7 Oct 2008 07:30:53 -0700 (PDT) Date: Tue, 7 Oct 2008 07:30:53 -0700 From: Jeremy Chadwick To: John Almberg Message-ID: <20081007143053.GA51120@icarus.home.lan> References: <0C63914A-E3A3-4FC7-92AD-797F407A5FF7@identry.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Cc: Jeremy Hooks , freebsd-questions@freebsd.org Subject: Re: thorny (for me) permissions problem X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Oct 2008 14:30:56 -0000 On Tue, Oct 07, 2008 at 10:23:53AM -0400, John Almberg wrote: > > On Oct 7, 2008, at 9:34 AM, Jeremy Hooks wrote: > >>>> 4. however, after upload, the file has the ownership A:B (i.e, >>>> owned by >> A, group B) with permissions -rw-r--r--. So B does not have permission >> to >> delete the file. >> -rw-r--r-- 1 user_a user_b 154879 Oct 7 08:40 data_file.csv >> >> Hi John. >> >> Correct me if I am wrong but permission to delete a file depends on >> the >> users permissions for the containing directory. If B has write >> permission >> on the directory then B can delete the file. However you will likely >> need >> to use 'rm -f'. > > Argh!!!! > > As a newbie admin, I really have a tough time with permissions. I swear I > got a permissions error when I tried to delete this dang file, but I just > logged in as B and was able to delete it just fine. Of course this is > because B owns the directory. > > I guess I must have done something boneheaded an hour or two ago... > gosh, I hate wasting time. Mine, and the lists, of course. > > Well, thanks to Valintin, I did figure out how to change the umask for > pure-ftpd. So now uploaded files have the permissions I wanted, even if > they are not needed. Be careful with what you've done. If you changed the umask on the ftpd as a whole, then suddenly unrelated users are going to find their files writeable by whatever group/GID they default to. For example, on my systems, everyone's default group is "users", and I definitely would not want group-write set to files people upload on their accounts! The idea of a user being able to edit or zero out other users' data is not good. But that's also what the underlying directory permissions are for... As you've learned/remembered today. :-) > And thanks to the rest, I figured out it was working all along... And > now I can't even duplicate the error I saw before... > > Does this ever get any easier??? How can any one person remember > all this stuff??? It gets easier with time; don't rush yourself. :-) Even those of us who have been using UNIX for almost 20 years forget the simplest of things on a regular basis. Be sure to let us know when you make the infamous "rm -fr" typo that nukes either / or ~. :-) -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |