bug-fileutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: chown 5.0.91 bug, regarding "." and ":"


From: Jim Meyering
Subject: Re: chown 5.0.91 bug, regarding "." and ":"
Date: Sat, 06 Dec 2003 14:30:53 +0100

Dylan Shell <address@hidden> wrote:
> program reports its version as 5.0.91.
> it seems to no longer accept a user followed by a group with a separator
> as a full-stop (the colon works fine).

Right.  Note that `.' is a valid part of a user name or group name
while `:' is not.  See below for how to enable the old `.'-accepting
behavior on your system.

> this means I get:
> # chown root. *
> chown: `root.': invalid user
> # chown root.audio *
> chown: `root.': invalid user
>
> but:
> # chown root *
> succeeds, as does
> # chown root:audio *
> etc...

That's not a bug.
The NEWS file (and announcement) says this:

- chown: `.' is no longer recognized as a separator in the OWNER:GROUP
  specifier on POSIX 1003.1-2001 systems.  If chown *was not* compiled
  on such a system, then it still accepts `.', by default.  If chown
  was compiled on a POSIX 1003.1-2001 system, then you may enable the
  old behavior by setting _POSIX2_VERSION=199209 in your environment.

Or look at the authoritative documentation by running `info chown':

     Some older scripts may still use `.' in place of the `:' separator.
  POSIX 1003.1-2001 (*note Standards conformance::) does not allow that,
  but you may be able to work around the compatibility problems by setting
  `_POSIX2_VERSION=199209' in your environment.  New scripts should avoid
  the use of `.' because GNU `chown' may fail if OWNER contains `.'
  characters.

> Note, that this is the exact opposite effect that was intended by
> deprecating the ":" option. The wrong one got cancelled.

`wrong' according to whom?

> Can someone explain the reason for doing so.

POSIX compliance.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]