Bug 1905463

Summary: "rm -rf *" performs an extra skip when it encounters an immutable empty directory
Product: Red Hat Enterprise Linux 7 Reporter: nishant.nayan
Component: coreutilsAssignee: Kamil Dudka <kdudka>
Status: CLOSED WONTFIX QA Contact: Radka Brychtova <rskvaril>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: kdudka
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1905481 (view as bug list) Environment:
Last Closed: 2021-05-06 14:09:34 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:
Bug Depends On: 1905481    
Bug Blocks:    

Description nishant.nayan 2020-12-08 12:14:58 UTC
The 'rm' utility' is skipping a mutable file when it encounters an immutable empty
directory (while deleting group of files and directories). Version(/8.22-18.0.1)/

Description: The bug is that rm skips an extra file while it encounters
an immutable empty directory. For example, on doing an "rm -rf *" on "a b c foo x y z",
where a,b,c,x,y,z are mutable files and foo is an immutable empty directory, the output was "foo x", as soon as rm encounters an immutable directory, it skips it's immediate next file(x in this case) and deletes all other files. 

Actual results: foo x


Expected results: foo

Refer upstream patch : https://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=6bf108358

Comment 2 Kamil Dudka 2020-12-08 13:08:54 UTC
Thank you for reporting the bug!  However, Red Hat Enterprise Linux 7 does not receive y-stream updates any more.  If the fix is important for your business, please escalate it through product support.

Comment 4 Kamil Dudka 2021-05-06 14:09:34 UTC
There is no business justification to fix this in RHEL-7.9.z.  The fix will eventually be provided in a minor update of RHEL-8.