Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 8040 - chown will not work on some account names
chown will not work on some account names
Product: Red Hat Linux
Classification: Retired
Component: fileutils (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
Depends On:
  Show dependency treegraph
Reported: 1999-12-29 02:05 EST by Richard Fairthorne
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-01-17 08:54:37 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Richard Fairthorne 1999-12-29 02:05:22 EST
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.

useradd toecheese.com
mkdir any_dir
chown toecheese.com any_dir

The chown will fail.
Comment 1 Bernhard Rosenkraenzer 2000-01-17 08:54:59 EST
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
Comment 2 Bernhard Rosenkraenzer 2000-01-17 08:57:59 EST
Sorry, `id -u toecheese.com` of course.

Note You need to log in before you can comment on or make changes to this bug.