[Bug 3660] Prevent disastrous unintended local copying
bugzilla-daemon at mindrot.org
bugzilla-daemon at mindrot.org
Fri Jan 26 18:36:14 AEDT 2024
https://bugzilla.mindrot.org/show_bug.cgi?id=3660
--- Comment #2 from Dan Jacobson <jidanni at jidanni.org> ---
Never mind about me.
I'm saying for the general public.
Let's go back to the scp man page.
Right at the top it says
> scp copies files between hosts on a network.
That would seem to exclude the same machine.
$ scp xx xx
cp: 'xx' and 'xx' are the same file
Good. At least it won't copy to the same file.
$ scp xx xy
$
OK, as a bonus it copys to the same machine.
But is should still wonder, why would the user want to copy to the same
machine?
He could have used just cp, one letter shorter than scp.
There is a 99% change the user didn't intend to copy to the same
machine,
and some disaster is about to happen.
Therefore, scp should be more responsible, and ask the user if he is
sure, at least.
No, users shouldn't be required to make fancy workarounds to prevent
the danger that is all due to questionable design.
--
You are receiving this mail because:
You are watching the assignee of the bug.
More information about the openssh-bugs
mailing list