cp: Symlink to dir contained in dir with permission 0 is considered as dangling
Open
Nobody has claimed this yet.
U - cp
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
Moved from https://github.com/coreutils/coreutils/issues/131#issuecomment-3568099385
$ mkdir -p D/D
$ chmod 0 D
$ ln -s D/D s # s is not dangling
$ cp /dev/null s
cp: not writing through dangling symlink 's'
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.
Research direction
Start by reproducing the reported cp command sequence with the directory permissions and symlink shown in the issue. No source file or test is named, so trace the cp entry point and its dangling-symlink handling, then add or update coverage so this case is treated according to the expected symlink status.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100