From owner-freebsd-current Thu Nov 16 10:51:33 2000 Delivered-To: freebsd-current@freebsd.org Received: from smtpproxy1.mitre.org (mb-20-100.mitre.org [129.83.20.100]) by hub.freebsd.org (Postfix) with ESMTP id 63CE837B479 for ; Thu, 16 Nov 2000 10:51:29 -0800 (PST) Received: from avsrv1.mitre.org (avsrv1.mitre.org [129.83.20.58]) by smtpproxy1.mitre.org (8.9.3/8.9.3) with ESMTP id NAA26084 for ; Thu, 16 Nov 2000 13:51:26 -0500 (EST) Received: from mailsrv2.mitre.org (mailsrv2.mitre.org [129.83.221.17]) by smtpsrv1.mitre.org (8.9.3/8.9.3) with ESMTP id NAA20598 for ; Thu, 16 Nov 2000 13:51:25 -0500 (EST) Received: from mitre.org ([128.29.145.140]) by mailsrv2.mitre.org (Netscape Messaging Server 4.15) with ESMTP id G44SDO00.3IJ; Thu, 16 Nov 2000 13:51:24 -0500 Message-ID: <3A142C81.AE1A74F2@mitre.org> Date: Thu, 16 Nov 2000 13:50:41 -0500 From: "Andresen,Jason R." Organization: The MITRE Corporation X-Mailer: Mozilla 4.75 [en]C-20000818M (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Mike Meyer Cc: Garrett Wollman , void , freebsd-current@FreeBSD.ORG Subject: Re: Proper permissons on /var/mail References: <20001116151809.A15312@firedrake.org> <200011161636.LAA83126@khavrinen.lcs.mit.edu> <3A1412C1.96608727@mitre.org> <14868.7551.791920.252398@guru.mired.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Mike Meyer wrote: > > Andresen,Jason R. types: > > Garrett Wollman wrote: > > > > > > < said: > > > > > > > I have a similar problem -- every time I make world, perms on /var/mail > > > > get set to 775. Mutt considers my mailbox read-only until I change it > > > > to 1777. > > > > > > It is misconfigured (or perhaps just broken). 1777 mode for /var/mail > > > is insecure, but was necessary in the mists of ancient past, before > > > UNIX learned to do file locking. Unless your mail spool is shared > > > over NFS (don't do that), locking is reliable and .lock files should > > > never be used or relied upon. > > > > Not the FreeBSD's file locking works anyway. > > Here's the results from a test of the below program: > > I can see at least two problems with the test program. > > 1) You're locking a shared descriptor. Possibly that should work, but > it's not a case I normally see. Moving the open after the fork > makes this behave better. Actually, it does work in Irix. I'll try that under FreeBSD.