Red Hat Bugzilla – Bug 8040
chown will not work on some account names
Last modified: 2008-05-01 11:37:53 EDT
chown incorrectly identifies account names containing periods as being
invalid. You may only chown files to such users by using numeric user-id's.
I discovered this problem while writing a script on the SPARC platform,
but I'm hazarding a wild guess that it's not a SPARC specific problem.
Here's how to duplicate it.
chown toecheese.com any_dir
The chown will fail.
It's not a bug, it's POSIX compliance.
You're not supposed to use a . in usernames.
chown toecheese.com blah
is equivalent to
chown toecheese file
chgrp com file
If you absolutely need to use a . in usernames, you can work around this by
using the User ID instead of the name, for example
chown `id toecheese.com` file
Sorry, `id -u toecheese.com` of course.