From owner-freebsd-questions@FreeBSD.ORG Thu May 8 08:48:31 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 C4DD11065673 for ; Thu, 8 May 2008 08:48:31 +0000 (UTC) (envelope-from unga888@yahoo.com) Received: from web57001.mail.re3.yahoo.com (web57001.mail.re3.yahoo.com [66.196.97.105]) by mx1.freebsd.org (Postfix) with SMTP id 59C5C8FC2A for ; Thu, 8 May 2008 08:48:30 +0000 (UTC) (envelope-from unga888@yahoo.com) Received: (qmail 48689 invoked by uid 60001); 8 May 2008 08:48:29 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=gb0bnC/MW1n1/hj3FNf0wh82eXXQn3d2nx0Cb/1mFOyWQLcviHXS3Raj0EYlW3W9IYVxlcNKgoQ1y2IZhM3IQP3Q8QrQm97TomwnrdkyyXk9IzPj7XIdS3thXb4nWvdHW//cvtSMV1zVOPH40GbG3uIr1n+ez006WMXR9LFIimg=; X-YMail-OSG: hS7aJ5cVM1mHcK7roPPVedDc3yrJRFQCi6rbKwIlhY83.FWsa8PCxeLfqbGLdxc1zfQI3XbxlpniGelFltqU4qs5GQFH36yT0GQ2tU8T.qUkJeU61u9tdoDJxGs- Received: from [165.21.154.75] by web57001.mail.re3.yahoo.com via HTTP; Thu, 08 May 2008 01:48:29 PDT Date: Thu, 8 May 2008 01:48:29 -0700 (PDT) From: Unga To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <846407.47995.qm@web57001.mail.re3.yahoo.com> Subject: Group of the newly created files and directories 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: Thu, 08 May 2008 08:48:31 -0000 Hi I have noticed in FreeBSD, the group of the newly created files and directories are assumed by default of the group of the parent directory! Eg. cd /tmp touch testfile.txt -rw-r--r-- 1 unga wheel 0 May 8 15:39 testfile.txt If you do the same in Linux, it would be: -rw-r--r-- 1 unga unga 0 May 8 15:39 testfile.txt That is, in Linux, the group will the user's primary group, but in FreeBSD, it is the the group of the parent directory! It is the same even if you use the open(2) system call with O_CREAT. I have following questions in this regard: 1. Is this the intended behaviour or error? 2. Where in FreeBSD the open(2) system call is implemented? Kind regards Unga ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ