bug-coreutils
[Top][All Lists]
Advanced

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

[bug #28341] chown does not support non-root usage


From: anonymous
Subject: [bug #28341] chown does not support non-root usage
Date: Fri, 18 Dec 2009 19:58:40 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5 (.NET CLR 3.5.30729)

URL:
  <http://savannah.gnu.org/bugs/?28341>

                 Summary: chown does not support non-root usage
                 Project: GNU Core Utilities
            Submitted by: None
            Submitted on: Fri 18 Dec 2009 07:58:38 PM UTC
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Any attempts to change a file from one owner to another fails, even if the
owner is a member of the same group, and the directory is writable.  For
example:

> dir -a
drwxrwsr-x  7 www-data www 4.0K 2009-09-14 14:14 .
drwxrwsr-x 11 www-data www 4.0K 2009-11-05 16:16 ..
-rw-rw-r--  1 www-data www 2.1K 2009-12-18 14:16 file.txt

> chown user file.txt
chown: changing ownership of `file.txt': Operation not permitted

Yet this works just file:

> cp file.txt file.txt.takeown
> rm file.txt
> mv file.txt.takeown
> touch -m -d 2009-12-18 14:16 file.txt
> chown 664 file.txt
> dir
-rw-rw-r--  1 user www 2.1K 2009-12-18 14:16 file.txt

The chown command should detect conditions like this and allow for the user
to take over ownership of a file without the need for unnecessary file access
or adjustment commands.





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?28341>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

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