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/