[Top][All Lists]

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

[bug #28113] chown silently fails to set uid/gid of ([ug]id_t) -1

From: Matt McCutchen
Subject: [bug #28113] chown silently fails to set uid/gid of ([ug]id_t) -1
Date: Sat, 28 Nov 2009 01:44:15 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20091105 Fedora/3.5.5-1.fc11 Firefox/3.5.5


                 Summary: chown silently fails to set uid/gid of ([ug]id_t)
                 Project: GNU Core Utilities
            Submitted by: hashproduct
            Submitted on: Sat 28 Nov 2009 01:44:14 AM GMT
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any



chown(2) and related system calls treat ([ug]id_t) -1 as a special value
meaning "don't change this field".  If chown(1) is called with a uid or gid of
([ug]id_t) -1 (typically 4294967295), it naively passes the value on to the
system call and, as a result, silently fails to do what the user asked.  It
should issue an error message in this case.  If the user had actually wanted
to not change a particular field, he/she would have used the appropriate
chown(1) syntax: "OWNER:" or ":GROUP".

Steps to reproduce:
$ touch test
$ chown 4294967295:4294967295 test
No error, but "test" still has the same ownership as before.

Tested with Fedora coreutils-7.2-4.fc11.x86_64 and with the latest coreutils
from the repository.

The problem came up at:


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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