Bug 525199

Summary: cp/mv: Preserving extended attributes doesn't work for read only files
Product: Red Hat Enterprise Linux 5 Reporter: Ondrej Vasik <ovasik>
Component: coreutilsAssignee: Ondrej Vasik <ovasik>
Status: CLOSED ERRATA QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: medium    
Version: 5.5CC: asersen, azelinka, mluscon
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: coreutils-5.97-31.el5 Doc Type: Bug Fix
Doc Text:
Previously, the cp, mv and install utilities were unable to preserve extended attributes on files with read-only permissions. This bug has been fixed and the extended attributes are now preserved correctly.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-21 10:35:28 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 Ondrej Vasik 2009-09-23 16:06:05 UTC
Description of problem:
Preserving extended attributes doesn't work for read only files due to kernel implementation of extended attribute setting (not dependent on file descriptor rights, but real access rights). Therefore if the source file is read only, preservation of extended attributes will fail.


Version-Release number of selected component (if applicable):
coreutils-5.97 from RHEL-5.4 ;)

How reproducible:
Always

Steps to Reproduce:
1. touch a
2. setfattr -n user.foo -v bar a
3. chmod a-w a
4. cp --preserve=xattr a b
  
Actual results:
Failure of xattr preservation - access denied

Expected results:
Extended attributes preserved

Additional info:
Fixed by http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=cca83fafa69eb26db458714830b77498b88af8a4 and http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=fe6f4e305c4ae24c542c460b8abddea648c7e8d1

Comment 1 RHEL Program Management 2009-11-06 18:49:49 UTC
This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release. If you would like
this request to be reviewed for the next minor release, ask your
support representative to set the next rhel-x.y flag to "?".

Comment 3 RHEL Program Management 2010-08-09 18:38:22 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 5 RHEL Program Management 2011-01-11 21:04:42 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 6 RHEL Program Management 2011-01-11 22:22:04 UTC
This request was erroneously denied for the current release of
Red Hat Enterprise Linux.  The error has been fixed and this
request has been re-proposed for the current release.

Comment 15 Tomas Capek 2011-07-13 12:10:56 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Previously, the cp, mv and install utilities were unable to preserve extended attributes on files with read-only permissions. This bug has been fixed and the extended attributes are now  preserved correctly.

Comment 16 errata-xmlrpc 2011-07-21 10:35:28 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1074.html

Comment 17 errata-xmlrpc 2011-07-21 12:11:37 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1074.html