User properties and how to make files with a specific group owner

Sahil Tandon sahil at tandon.net
Thu Jul 10 03:30:06 UTC 2008


Andrew Falanga <af300wsm at gmail.com> wrote:

> I've not had to set this up and so far my efforts have proven less than 
> successful.  I'm working on a web project with my father and one other 
> developer.  I need to have it so that our user id's, when creating files in 
> the directory we share the source code in, create the files with the group 
> id common to the three of us.  How do I do this?

[...]
                          
New files are created with GID set to that of the directory in which they're 
contained.  In your case, is that directory owned by user and group 'andy'? 
If so:                          

% chown -R :www /path/to/shared/directory

... and every file created therein will have the default GID.

-- 
Sahil Tandon <sahil at tandon.net>


More information about the freebsd-questions mailing list