Skip to content

cp: apply umask to freshly created directories - #14560

Open
wtcpython wants to merge 1 commit into
uutils:mainfrom
wtcpython:cp-dir-umask
Open

wtcpython wants to merge 1 commit into
uutils:mainfrom
wtcpython:cp-dir-umask

Conversation

@wtcpython

Copy link
Copy Markdown
Contributor

Newly created directories previously inherited unmasked source permissions in recursive copy because copy_attributes promoted any freshly created directory to Preserve::Yes when mode was not explicitly disabled.

This applies the umask to freshly created directories when mode is not preserved, matching regular file copy behavior.

Fixes #14549.

Copilot AI lite review requested due to automatic review settings September 14, 2026 14:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

github-actions Bot commented Sep 14, 2026

Copy link
Copy Markdown

GNU testsuite comparison:

Skip an intermittent issue tests/cut/bounded-memory (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/date/date-locale-hour (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/pr/bounded-memory (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/seq/seq-epipe is now passing!

Copilot AI review requested due to automatic review settings September 15, 2026 08:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

cp -r creates directories with the source's mode, ignoring the umask

2 participants