What does `chown root.root $file` mean

chown

I'm trying to install colordiff in a custom directory because I do not have sudo privileges. I did make the directories hard-coded in the Makefile as stated in the README, but I'm getting this error:

...
chown root.root /share/edu-mei/colordiff/1.0.13/etc/colordiffrc
chown: changing ownership of `/share/edu-mei/colordiff/1.0.13/etc/colordiffrc': Operation not permitted
make: [install] Error 1 (ignored)
...

Changing this file ownership is not really a problem (probably the reason that the author ignores this). However I'm not familiar with this usage of chown.

The manpage from chown says that the command syntax is:

chown [OPTION]... [OWNER][:[GROUP]] FILE...
chown [OPTION]... --reference=RFILE FILE...

But the command executed is chown root.root $file.

What does the syntax with a dot rather than a colon mean?

Best Answer

It sets the user and group of $file to root (as in chown OWNER.GROUP FILE...). It's the same as calling chown root:root $file, but an older form.

The period was replaced by a colon, giving chown OWNER:GROUP FILE... as documented, because periods could potentially appear in user/group names.

Related Question