4

Why does GNU chown user.group work? The docs say nothing of the syntax being supported. Is there a juicy story behind it?

  • 1
    Same question here – don_crissti Nov 24 '15 at 18:14
  • great example of a question that should have been migrated here. – Evan Carroll Nov 24 '15 at 18:31
5

info chown is clear on that:

Some older scripts may still use `.' in place of the `:' separator.
POSIX 1003.1-2001 (*note Standards conformance::) does not require
support for that, but for backward compatibility GNU `chown' supports
`.' so long as no ambiguity results. New scripts should avoid the use
of `.' because it is not portable, and because it has undesirable
results if the entire OWNER`.'GROUP happens to identify a user whose
name contains `.'.

In case of GNU programs it's often worth checking not only man but also info pages because GNU folks abhor manpages (from man tar).

  • 1
    Important historical context: when chown first gained the ability to do user and group in a single command (4.3BSD is the earliest such example I can find), people didn't do crazy things like put dots in their usernames. Dots, dashes, capital letters, more than 8 characters long... all unthinkable. Also the colon is the one character that's safe from future growth of the set of allowable usernames, because it's the separator in /etc/passwd – user41515 Oct 21 '16 at 21:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.