Skip to content

fix(cp): always create dest dirs with owner write bit before fixing permissions#11318

Open
baa-ableton wants to merge 2 commits intouutils:mainfrom
baa-ableton:fix/cp-readonly-source-dir
Open

fix(cp): always create dest dirs with owner write bit before fixing permissions#11318
baa-ableton wants to merge 2 commits intouutils:mainfrom
baa-ableton:fix/cp-readonly-source-dir

Conversation

@baa-ableton
Copy link

@baa-ableton baa-ableton commented Mar 13, 2026

While working on a related bug (nushell#17548), I traced the root cause back to uu_cp itself.

When copying a read-only directory with -p -r, build_dir() creates the destination with the source's read-only permissions. This causes cp to fail with a permission error when it then tries to copy files into it.

@github-actions
Copy link

GNU testsuite comparison:

Note: The gnu test tests/dd/no-allocate is now being skipped but was previously passing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant