cp wrong permission of source directory instead of umask
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 52/100
Research direction
Start at the cp command implementation and reproduce the issue with the mkdir, chmod, and umask commands shown in the report. Compare the copied directory's permissions with GNU cp, then add or update the relevant test if the repository provides one. Done means newly created destination directories respect the process umask while preserving the reported source attributes behavior.
Written by the indexing model from the issue text.
Description
Following #10529, all newly created directories copy attributes from their source regardless of the preserve setting. This ignores the umask setting of the process and causes discrepancy with GNU:
mkdir test
chmod 770 test
GNU:
(umask 700; cp -r test test-copy)
ls -l
drwxrwx---. 1 my4ng my4ng 0 Feb 11 03:14 test
d---rwx---. 1 my4ng my4ng 0 Feb 11 03:14 test-copy
uutils:
(umask 700; cp -r test test-copy)
ls -l
drwxrwx---. 1 my4ng my4ng 0 Feb 11 03:16 test
drwxrwx---. 1 my4ng my4ng 0 Feb 11 03:16 test-copy
It seems GNU's implementation makes the target's permission to be the intersection of source and umask.
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from uutils/coreutils
-
U - ls
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
U - ls
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
U - tr
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
U - date
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
U - date
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
All issues in uutils/coreutils
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100