On Thu, May 28, 2015 at 8:40 AM, <n.reu...@hxgn.net> wrote: > i just discovered that on BSD, a file inherits the group permissions from > the directory it is created in (contrary to Linux, which uses the default > group of the user). > > But i failed to find more information on that topic in the man pages > (chmod, chgrp, chown, touch, chflags) or the FAQ, just Otto@ replying on > misc [1]. > > Is this expected to be known, or does this information exist somewhere in > the documentation?
more specifically, BSD treats directories as if they always have the setgid bit set. I think this is expected to be known, although it does exist in the documentation (but I had to consult wikipedia to find out where): "man 2 open" says: When a new file is created it is given the group of the directory which contains it. -ken