# chown space in group name



## triumdh (Apr 10, 2010)

I am trying to change the group ownership of a folder. I am having problems as the Active Directory group name has a space in it. I do not have the option of changing the group name.


```
# chown 'DOMAIN\group name' /foldername
chown: DOMAIN\group name: Invalid argument
```

I have successfully completed this task with other groups without a space in the name.
The only thing a search has revealed is that other people have had this issue.
Any help would be appreciated.


----------



## fronclynne (Apr 11, 2010)

Does the group name map to a group id number?  (I don't really know [scatological] about Active Directory)


----------



## graudeejs (Apr 11, 2010)

it will fail even without spaced, because you are using *chown*, instead of *chgrp*
for *chown* you need *username:groupname* (*:groupname* might just work)

try

```
# chgrp 'DOMAIN\group name' /foldername
```


----------



## triumdh (Apr 12, 2010)

Does the group name map to a group id number?
Yes

Same error message on chgrp or chown with space. Both work fine without the space.


----------



## triumdh (Apr 12, 2010)

*Solved*


```
chgrp 'windows group' /foldername
```

works as Samba was not looking for domain name to proceed group name.

Thanks for your answers.


----------

