Repository navigation
chown, chgrp: report -R files that cannot be stat'd with -v - #15126
Draft
abendrothj wants to merge 5 commits into
Draft
abendrothj wants to merge 5 commits into
abendrothj wants to merge 5 commits into
Conversation
Merging this PR will not alter performance1 warning
Comparing Footnotes
|
sylvestre
reviewed
Oct 6, 2026
sylvestre
reviewed
Oct 6, 2026
abendrothj
force-pushed
the
chown-verbose-failures
branch
from
October 7, 2026 02:27
3fd3860 to
b99a774
Compare
abendrothj
force-pushed
the
chown-verbose-failures
branch
from
October 7, 2026 08:02
b99a774 to
efea4f3
Compare
abendrothj
force-pushed
the
chown-verbose-failures
branch
from
October 12, 2026 11:38
efea4f3 to
a37ca9a
Compare
abendrothj
marked this pull request as draft
October 23, 2026 07:30
abendrothj
force-pushed
the
chown-verbose-failures
branch
from
November 7, 2026 06:33
a37ca9a to
6383ddd
Compare
The error itself stays on stderr, as in GNU. On Linux, files below a -R operand now get the line too.
On Linux the file is held with O_PATH, rechecked and changed through that descriptor, so a rename after the check no longer redirects it.
On Linux it was skipped without a message; it is now changed by name, or held with O_PATH under --from. -R still leaves it alone, as in GNU.
--from and -v used the link's owner, not the target that is changed. A link whose target cannot be stat'd is now reported and left alone.
A dangling link under -H or -L, or an unreadable -R operand, got no "failed to change" line from -v.
abendrothj
force-pushed
the
chown-verbose-failures
branch
from
November 8, 2026 23:26
6383ddd to
1d5d2da
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on #15125; only the last commit is new here.
On Linux,
chown -R -vprinted no "failed to change ownership of ..." line for a file below the operand whose owner couldn't be read, such as a dangling link under -H or -L, nor for an unreadable -R operand. GNU 9.12 prints one for each, as it does for an operand. Other platforms still walk with walkdir here and get this with #15128.These now get the operand's line, on stdout since #16239, with "group" for chgrp. The line names only the new owner, as GNU's does for an unreadable -R operand, and that operand gets only this line, whatever --from says. Tests:
test_chown_verbose_reports_dangling_symlink_under_big_l,test_chgrp_verbose_reports_dangling_symlink_under_big_l,test_chown_verbose_reports_unreadable_dir_operand.Closes #15115