chown confusion

Noel Jones noeldude at gmail.com
Thu Apr 27 22:07:19 UTC 2006


On 4/27/06, Huy Ton That <huyslogic at gmail.com> wrote:
> Okay I'm feeling like an idiot now, if i chowned a directory such that
>
> user 'x' had the ownership of a given directory and was in group 'alpha'
>
> user 'b' needed to add files to the said directory and was in group 'alpha'
>
> now I know usually you do chown :groupname <dir/file> or chown
> user:groupname <dir/file> to change ownership however...
>
> I can limit a directory to only a user, but I want to limit it not at a user
> level, but at a group level such that all users in a group can write to a
> file.
>
> An option to remove ownership perhaps chown -:groupname does this make
> sense?

Sounds as if you want to change the permissions to allow group
read/write of the directory, at which point the owner won't matter.
You probably want something like:
# chgrp groupname dirname
# chmod ug+rwx dirname

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/permissions.html

--
Noel Jones


More information about the freebsd-questions mailing list