Repository navigation
chown, chgrp: judge --from on a symlink's target under -R -H - #15125
Draft
abendrothj wants to merge 4 commits into
Draft
abendrothj wants to merge 4 commits into
abendrothj wants to merge 4 commits into
Conversation
Merging this PR will not alter performance1 warning
Comparing Footnotes
|
abendrothj
marked this pull request as draft
October 7, 2026 00:20
abendrothj
force-pushed
the
chown-from-symlink-target
branch
3 times, most recently
from
October 12, 2026 11:38
2b8bc49 to
8934ad8
Compare
Contributor
|
sorry but it needs to be rebased |
sylvestre
reviewed
Nov 5, 2026
sylvestre
reviewed
Nov 5, 2026
abendrothj
force-pushed
the
chown-from-symlink-target
branch
from
November 7, 2026 06:33
8934ad8 to
41e42e0
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.
abendrothj
force-pushed
the
chown-from-symlink-target
branch
from
November 8, 2026 23:26
41e42e0 to
2375b5c
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 #15124; only the last commit is new here.
On Linux, with -R -H, a symlink met in the tree was stat'd itself but the change went to the file it points to, so --from was judged on the link's owner, and -v reported the link's owner. GNU 9.12 judges and reports the target.
Under -R -H the target is now stat'd for --from and the report, and with --from held for the change. A link whose target can't be stat'd is reported ("cannot dereference") and left alone, as with GNU 9.12. Tests:
test_chown_from_judges_symlink_target_under_big_h,test_chown_dangling_symlink_under_big_h.Part of #15027