Bug 887001

Summary: Root privilege faking fails for a file/directory copy
Product: [Fedora] Fedora Reporter: Miloslav Trmač <mitr>
Component: fakerootAssignee: Dominik 'Rathann' Mierzejewski <dominik>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: axel.thimm, lantw44, lnie
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: fakeroot-1.20.2-3.fc23 fakeroot-1.20.2-3.fc22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-08 03:22:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Miloslav Trmač 2012-12-13 19:32:38 UTC
Version-Release number of selected component (if applicable):
fakeroot-1.12.4-4.fc17.x86_64


$ fakeroot
# echo 'foo' > file1
# chmod 0 file1
# ls -l file1
----------. 1 root root 4 13. pro 20.27 file1
# cat file1   ## works fine
foo
# cp -a file1 file2
# ls -l file1 file2   ## both files look the same, but...
----------. 1 root root 4 13. pro 20.27 file1
----------. 1 root root 4 13. pro 20.27 file2
# cat file2   ## operating on the copy fails
cat: file2: Permission Denied


Creating a mode-0 directory and copying it results in a similar inconsistency (in that case the copied directory has reported permissions 700 and still can't be read).

Comment 1 Fedora End Of Life 2013-07-03 19:44:13 UTC
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Miloslav Trmač 2013-07-04 13:48:22 UTC
Reproduced with fakeroot-1.12.4-5.fc18.x86_64.

Comment 3 Fedora End Of Life 2013-07-31 18:35:32 UTC
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 4 Miloslav Trmač 2013-08-01 12:06:14 UTC
Reproduced with fakeroot-1.12.4-6.fc19.x86_64 .

Comment 5 Fedora End Of Life 2015-01-09 22:02:37 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 Miloslav Trmač 2015-01-12 19:08:53 UTC
Reproduced with fakeroot-1.18.4-2.fc20.x86_64.

Comment 7 Fedora Admin XMLRPC Client 2015-02-26 23:21:38 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 8 Fedora End Of Life 2015-05-29 08:49:34 UTC
This message is a reminder that Fedora 20 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 20. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '20'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 20 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 9 Miloslav Trmač 2015-06-02 20:26:26 UTC
Same in fakeroot-1.18.4-4.fc22.x86_64 .

Comment 10 Dominik 'Rathann' Mierzejewski 2015-06-17 12:08:41 UTC
I'm planning to update to 1.20.2 first. Let's see if it's fixed there. If not, I'll file a bug upstream.

Comment 11 Dominik 'Rathann' Mierzejewski 2015-06-18 08:36:50 UTC
Unfortunately it's still reproducible with 1.20.2:

[rathann@sakura /tmp]$ fakeroot
[root@sakura /tmp]# echo 'foo' > file1
[root@sakura /tmp]# chmod 0 file1
[root@sakura /tmp]# ls -l file1
---------- 1 root root 4 Jun 18 10:34 file1
[root@sakura /tmp]# cat file1
foo
[root@sakura /tmp]# cp -a file1 file2
[root@sakura /tmp]# ls -l file1 file2
---------- 1 root    root    4 Jun 18 10:34 file1
---------- 1 rathann rathann 4 Jun 18 10:34 file2
[root@sakura /tmp]# cat file2
cat: file2: Permission denied

I'll file a report upstream.

Comment 12 Jan Kurik 2015-07-15 14:55:18 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 23 development cycle.
Changing version to '23'.

(As we did not run this process for some time, it could affect also pre-Fedora 23 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 23 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora23

Comment 13 Dominik 'Rathann' Mierzejewski 2015-09-23 21:27:33 UTC
Filed upstream: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=799852

Comment 14 Ting-Wei Lan 2015-12-16 19:56:23 UTC
Adding libacl-devel to BuildRequires seems to fix the issue:
https://bugs.alpinelinux.org/issues/2689

My commands output:
[test2@wn tmp]$ fakeroot
[root@wn tmp]# echo 'foo' > file1
[root@wn tmp]# chmod 0 file1
[root@wn tmp]# ls -l file1
---------- 1 root root 4 Dec 11 13:52 file1
[root@wn tmp]# cat file1
foo
[root@wn tmp]# cp -a file1 file2
[root@wn tmp]# ls -l file1 file2
---------- 1 root root 4 Dec 11 13:52 file1
---------- 1 root root 4 Dec 11 13:52 file2
[root@wn tmp]# cat file2
foo

Comment 15 Fedora Update System 2015-12-27 01:20:36 UTC
fakeroot-1.20.2-3.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-0a31119f77

Comment 16 lnie 2015-12-28 09:01:21 UTC
fakeroot-1.20.2-3.fc23 fixed this bug,but I got the following output when  installing the package:
warning: %post(fakeroot-1.20.2-3.fc23.x86_64) scriptlet failed, exit status 126
Non-fatal POSTIN scriptlet failure in rpm package fakeroot
Non-fatal POSTIN scriptlet failure in rpm package fakeroot
error: %preun(fakeroot-1.20.2-1.fc23.x86_64) scriptlet failed, exit status 126
Error in PREUN scriptlet in rpm package fakeroot
Error in PREUN scriptlet in rpm package fakeroot

Comment 17 Fedora Update System 2015-12-29 00:55:24 UTC
fakeroot-1.20.2-3.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-7df1a39fc5

Comment 18 Fedora Update System 2015-12-29 22:23:23 UTC
fakeroot-1.20.2-3.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 19 Fedora Update System 2015-12-30 20:54:41 UTC
fakeroot-1.20.2-3.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-0a31119f77

Comment 20 Dominik 'Rathann' Mierzejewski 2016-01-02 16:25:44 UTC
(In reply to lnie from comment #16)
> fakeroot-1.20.2-3.fc23 fixed this bug,but I got the following output when 
> installing the package:
> warning: %post(fakeroot-1.20.2-3.fc23.x86_64) scriptlet failed, exit status
> 126
> Non-fatal POSTIN scriptlet failure in rpm package fakeroot
> Non-fatal POSTIN scriptlet failure in rpm package fakeroot
> error: %preun(fakeroot-1.20.2-1.fc23.x86_64) scriptlet failed, exit status
> 126
> Error in PREUN scriptlet in rpm package fakeroot
> Error in PREUN scriptlet in rpm package fakeroot

Sorry, but I cannot reproduce this (using dnf). Is this using dnf or yum? Please open a new bug and attach full debug log.

Comment 21 Fedora Update System 2016-01-08 03:22:14 UTC
fakeroot-1.20.2-3.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.

Comment 22 Miloslav Trmač 2016-01-08 15:01:53 UTC
Fix confirmed, thanks!  (I didn’t check the scriptlets.)