| Summary: | cp ignores read-only permission on existing destination file overwrite conditions | ||
|---|---|---|---|
| Product: | Busybox | Reporter: | Daniel Kirkdorffer <dankirkd> |
| Component: | Standard Compliance | Assignee: | unassigned |
| Status: | NEW --- | ||
| Severity: | major | CC: | busybox-cvs |
| Priority: | P5 | ||
| Version: | 1.28.x | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Host: | Target: | ||
| Build: | |||
|
Description
Daniel Kirkdorffer
2018-10-24 22:19:39 UTC
Note: specifically using busybox 1.28.4-r1 Further details on my environment: Running within a Docker container built with 0.27.2 of the docker-maven-plugin. $ uname -a Linux 1375916cea83 4.9.60-linuxkit-aufs #1 SMP Mon Nov 6 16:00:12 UTC 2017 x86_64 Linux you're describing a non-standard behavior of cp (no-clobber flag in coreutils). simply setting a file to 0440 is not sufficient to stop cp from overwriting it (try cp -f on coreutils, it will succeed). cp calls unlink(2) which takes directory permissions into account, not the permissions of the link Are there any other opinions on this issue? |