From owner-freebsd-stable@FreeBSD.ORG Fri Jul 30 05:34:18 2004 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4D58B16A4CE for ; Fri, 30 Jul 2004 05:34:18 +0000 (GMT) Received: from smtp3.adl2.internode.on.net (smtp3.adl2.internode.on.net [203.16.214.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 964B743D5A for ; Fri, 30 Jul 2004 05:34:17 +0000 (GMT) (envelope-from malcolm.kay@internode.on.net) Received: from beta.home (ppp55-219.lns1.adl2.internode.on.net [150.101.55.219])i6U5XtHY031447; Fri, 30 Jul 2004 15:03:56 +0930 (CST) From: Malcolm Kay Organization: at home To: "Amiel Ong" , Date: Fri, 30 Jul 2004 15:03:55 +0930 User-Agent: KMail/1.5.4 References: <004201c47150$1726aef0$7c00a8c0@amiel> In-Reply-To: <004201c47150$1726aef0$7c00a8c0@amiel> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200407301503.55104.malcolm.kay@internode.on.net> Subject: Re: permissions X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2004 05:34:18 -0000 On Saturday 24 July 2004 17:00, Amiel Ong wrote: > How can I make a directory permission so that > the user can write but cannot delete a file inside the directory? > I suspect you mean "create" rather than "write". Some of the responses to your query seem to be unnecessarily complicated. I think you are looking for the same permissions as normally apply to the /tmp directory which can be achieved with: $ chmod ugo+xrwt my-special-directory If you want any user to be able to "write" to an "existing" file in the directory then in general I believe the permissions on that particular file must permit write for that user: $ chmod o+rw particular-file Ability to write an existing file does relate the ability to delete it. The latter depends on the permissions of the directory containing the file, as indeed does the ability to create a file. Malcolm