Bug 176708

Summary: install(1) does not check failed chown/chgrp
Product: [Fedora] Fedora Reporter: Jan Kratochvil <web-bugzilla.redhat.com>
Component: coreutilsAssignee: Tim Waugh <twaugh>
Status: CLOSED RAWHIDE QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: 4   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: 5.93-7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 487150 (view as bug list) Environment:
Last Closed: 2006-01-05 10:37:24 EST Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On:    
Bug Blocks: 487150    

Description Jan Kratochvil 2005-12-30 08:59:52 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050923 Galeon/2.0.0

Description of problem:
Due to AFS patches and the default --with-afs build the install(1) command ignores any errors on setting owner (-o) or group (-g) and silently returns exit code 0 while leaving the owner/group unchanged.


Version-Release number of selected component (if applicable):
coreutils-5.2.1-48.1

How reproducible:
Always

Steps to Reproduce:
1. su - lace
2. install -o root -g root -m 4755 /bin/true /tmp/test-true
3. ls -l /tmp/test-true


Actual Results:  -rwsr-xr-x  1 lace lace 15680 Dec 30 22:58 /tmp/test-true*


Expected Results:  install: cannot change ownership of `/tmp/test-true': Operation not permitted


Additional info:

SuSE 10.0 behaves correctly - reports the error as shown above.

Fixing this AFS workaround may affect existing Fedora Core packages relying on successful install(1) with non-standard owner/group while rpmbuild(8) being run as non-root.

The fix should probably check on the failure if the target file is located on AFS volume and inhibit the error only in such case. No patch provided, though.
Comment 2 Tim Waugh 2006-01-05 10:37:24 EST
Thanks for the report.  I've removed the AFS special-case in install.c for the
moment.