From owner-freebsd-questions Tue Apr 23 20:12:19 2002 Delivered-To: freebsd-questions@freebsd.org Received: from infinity.aesredfish.net (ns1.aesredfish.net [65.168.0.12]) by hub.freebsd.org (Postfix) with ESMTP id 6C14237B416 for ; Tue, 23 Apr 2002 20:12:14 -0700 (PDT) Received: from potentialtech.com (mhope-dhcp-65-168-1-181.dashfast.com [65.168.1.181]) by infinity.aesredfish.net (8.11.6/8.11.0) with ESMTP id g3O3C6m02065; Tue, 23 Apr 2002 23:12:06 -0400 Message-ID: <3CC623B8.2050209@potentialtech.com> Date: Tue, 23 Apr 2002 23:17:12 -0400 From: Bill Moran Organization: Potential Technologies User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:0.9.3) Gecko/20010914 X-Accept-Language: en-us MIME-Version: 1.0 To: Peter Brezny Cc: freebsd-questions@freebsd.org Subject: Re: default permissions on a directory References: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Peter Brezny wrote: > Hi everyone, > > Is there a way to configure a directory in such a way that if any files are > placed into it, those files will automatically be given a predefined set of > permissions? umask > For example, I've got a samba share that three different users are allowed > to place files into, however, currently they are only able to be modified by > the user that placed them there. Samba has ways of doing this. Look at the Samba config information. "user create mask" I believe it's called. > I'd like any files that go into that diredtory to be chmod 775 by default > (since the group that owns that directory contains all the users that have > access). You may want to exclude x permissions from that, it'll probably never be a problem, but why risk it. Using the setgid bit works well, it makes any file created in the directory belong to the same group as that directory. Thus, if you give it 660 permissions, the owner, as well as all members of the group in that directory have access - works real nice. chmod g+s /directory/name -- Bill Moran Potential Technology http://www.potentialtech.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message