[Bug 11431] New: cp ignores read-only permission on existing destination file overwrite conditions
bugzilla at busybox.net
bugzilla at busybox.net
Wed Oct 24 22:19:39 UTC 2018
https://bugs.busybox.net/show_bug.cgi?id=11431
Bug ID: 11431
Summary: cp ignores read-only permission on existing
destination file overwrite conditions
Product: Busybox
Version: 1.28.x
Hardware: All
OS: Linux
Status: NEW
Severity: major
Priority: P5
Component: Standard Compliance
Assignee: unassigned at busybox.net
Reporter: dankirkd at comcast.net
CC: busybox-cvs at busybox.net
Target Milestone: ---
The following demonstrates the expected behavior of "cp" when we try to copy a
file over an existing read-only file:
$ mkdir aaa
$ cd aaa
$ touch a.txt
$ touch b.txt
$ ls -laF
total 0
drwxr-xr-x 4 user1 group1 136 Oct 24 12:25 ./
drwxr-xr-x 13 user1 group1 442 Oct 24 12:24 ../
-rw-r--r-- 1 user1 group1 2 Oct 24 12:25 a.txt
-rw-r--r-- 1 user1 group1 1 Oct 24 12:25 b.txt
$ chmod 440 *.txt
$ ls -laF
total 0
drwxr-xr-x 4 user1 group1 136 Oct 24 12:25 ./
drwxr-xr-x 13 user1 group1 442 Oct 24 12:24 ../
-r--r----- 1 user1 group1 2 Oct 24 12:25 a.txt
-r--r----- 1 user1 group1 1 Oct 24 12:25 b.txt
$ cp a.txt b.txt
cp: b.txt: Permission denied
However, when using Busybox "cp" (on Alpine 3.8), the operation succeeds
without permission issues.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list