NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/54381: cp read-only-file /to/psshfs/ returns EPERM
>Number: 54381
>Category: kern
>Synopsis: cp read-only-file /to/psshfs/ returns EPERM
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jul 16 12:50:00 +0000 2019
>Originator: Tobias Ulmer
>Release: NetBSD 8.99.50
>Organization:
>Environment:
NetBSD phenom.tmux.org 8.99.50 NetBSD 8.99.50 (GENERIC) #0: Fri Jul 12 10:39:12 UTC 2019 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
Copy a user owned read-only file to a user writable psshfs mountpoint like so:
tobiasu@phenom:tobiasu$ ./tfs
+ rm -f rw ro mnt/rw mnt/ro rw.log ro.log
+ echo rw >rw
+ echo ro >ro
+ chmod 444 ro
+ ktruss cp rw mnt/ >rw.log
+ ktruss cp ro mnt/ >ro.log
cp: mnt/ro: Operation not permitted
huh?
"rw" does what you expect:
1010 1 cp __stat50("rw", 0x7a15bdb4c1b8) = 0
1010 1 cp __stat50("mnt/rw", 0x7f7fffab5fc0) Err#2 ENOENT
1010 1 cp open("rw", 0, 0) = 3
1010 1 cp open("mnt/rw", 0x601, 0x81b4) = 4
0x81b4 = 0100664
"ro" uses a different file mask:
161 1 cp __stat50("ro", 0x6fcf05dd21b8) = 0
161 1 cp __stat50("mnt/ro", 0x7f7fff750ca0) Err#2 ENOENT
161 1 cp open("ro", 0, 0) = 3
161 1 cp open("mnt/ro", 0x601, 0x8124) Err#1 EPERM
0x8124 = 0100444
>How-To-Repeat:
>Fix:
Home |
Main Index |
Thread Index |
Old Index