Bug 785952

Summary: chown verbose reports incorrect retained user:group for objects not matched to with --from=
Product: [Fedora] Fedora Reporter: Tero Nieminen <ttn>
Component: coreutilsAssignee: Ondrej Vasik <ovasik>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 16CC: kdudka, maxamillion, ovasik, pbrady, twaugh
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: coreutils-8.12-6.fc16 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-08 22:59:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Tero Nieminen 2012-01-31 01:09:56 UTC
Description of problem:
F16/Chown command when used together with options -v and --from= prints out incorrect information on retained owner and group for targets left untouched due to not matching arguments of --from: it prints out the owner:group you tried to change to instead of the actual retained owner and group. bug-coreutils confirmed that this does not occur on stock GNU/coreutils - at least as of coreutils-8.15. They also confirmed F16/coreutils-8.12-2 was affected.

Version-Release number of selected component (if applicable):
coreutils-8.12-2.fc16.x86_64

How reproducible:
Always

Steps to Reproduce:
1.sudo su -
2.mkdir test
3.chown 500:500 test
4.chown -v --from=600:600 1000:1000 test

Actual results:

Any object not matched with --from= produces output like:
ownership of `test' retained as 1000:1000

Expected results:
printout: ownership of `test' retained as 500:500

Additional info:

The non-matched objects do retain their original owner and group.

The output is the same for non-root users as well. The problem only seems to lie in the verbose printout of chown: the actual owner change itself as well as the --from matching would appear to be unaffected (haven't tested extensively though). The incorrect verbose output can, nonetheless, be quite confusing if the verbose output is actually used for something, like verifying operation of "chown -R" on large batch on files for instance.

Comment 1 Pádraig Brady 2012-01-31 01:44:59 UTC
Yep this was fixed in 8.13
http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=6b282e7510ca8d

Comment 2 Ondrej Vasik 2012-01-31 06:38:09 UTC
And update for this is alredy submitted - see https://admin.fedoraproject.org/updates/FEDORA-2012-1031/coreutils-8.12-6.fc16

Comment 3 Fedora Update System 2012-01-31 09:49:12 UTC
coreutils-8.12-6.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/FEDORA-2012-1031/coreutils-8.12-6.fc16

Comment 4 Fedora Update System 2012-02-08 22:59:59 UTC
coreutils-8.12-6.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.