Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 8 May 2008 01:48:29 -0700 (PDT)
From:      Unga <unga888@yahoo.com>
To:        freebsd-questions@freebsd.org
Subject:   Group of the newly created files and directories
Message-ID:  <846407.47995.qm@web57001.mail.re3.yahoo.com>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?846407.47995.qm>