# chown Groups NOT WORKING :(



## jjjustjjjay (Feb 21, 2010)

Hey Everybody

I have read how to do this in manuals and Im almost positive I'm doing it right. I want a group to own the folder pub (/usr/pub) and all folder in it. I made the group pub and added the two users i wanted.

so I ran chown like this

```
chown -R :pub /usr/pub
```

when i press enter i get no error. but when i try to change stuff in pub with the users i get permission denied. 

Whats happening?

-Thanks


----------



## FBSDin20Steps (Feb 21, 2010)

Try this...


```
# chown -R group:user /usr/pub
```


----------



## sixtydoses (Feb 21, 2010)

The format is `# chown -R user:group /path/to/dir`.

And make sure that 'group' is allowed to 'write'.

`# chmod -R g+w /usr/pub`


----------



## graudeejs (Feb 21, 2010)

or simply use `$ chgrp -R group /path`


----------



## fronclynne (Feb 21, 2010)

[cmd=""]chown -R :group /file[/cmd] is good syntax, but as *sixtydoses* above saith, you need to [cmd=""]chmod g+w /file[/cmd] as well (-R as needed).


----------

