0

I am trying to change ownership on a file but am having trouble, before it used to work, now I think I am using the wrong syntax,

chown -R Person:User **

or is it users? I tried both and none work, what am I doing wrong? Also I am logged as root.

Jorge Castro
  • 71,754
Ferdinand
  • 725

3 Answers3

1

It's actually "owner:group", meaning that you have to provide a username for the first and a groupname for the second argument. Giving a username as the second argument should lead to an error if there is no group of the same name.

Mrokii
  • 502
  • I tried all sorts of combination, the problem wasn't the syntax though it was a capitalization error. Thanks Mrokii you helped clarify it for me. – Ferdinand Jul 12 '12 at 17:17
0

Mrokii is correct; in addition,if you are trying to change ownership on a single file you don't need the -R (recursive option) as one has to be very careful when recursively changing ownership of files. Also, logging in as root is not usually done in Ubuntu desktop unless you do it via the ctrl-alt-fn virtual terminals just for the duration of that session then return to the graphical desktop.

  • Yes I used the -R intentionally. I like working from root because of less hassle when trying to access certain things within the system. But I log in as root using "sudo -i" is that not the same as the root you speak of? – Ferdinand Jul 12 '12 at 17:20
  • Yes it's the same thing -a root login shell. –  Jul 12 '12 at 17:26
0
chown -R me:users **

Worked, I was capitalizing on the first letter, apparently that is a no no.

Ferdinand
  • 725