BUG: scp -r follows symlinks

Ben Lindstrom mouring at etoh.eviladmin.org
Tue Jan 6 12:09:16 EST 2004


And breaks rcp compatible syntax which is WORSE because that is what
people DEPEND on when moving from rcp/rsh to scp/ssh.

- Ben

On Mon, 5 Jan 2004, Edward S. Peschko wrote:

> hey all
>
> 'scp -r ' follows symlinks. IMO this is a bug and should be changed - it:
>
> 	a) hampers the use of scp. As it stands, I cannot use 'scp -r' because of this
>        behavior. If someone links to '/', or if I hit a recursive symlink, I'm screwed.
>
> 	b) It is inconsistant with cp. When you 'cp -r' on a file, it does NOT follow the
> 	   symlink. When you scp -r on a file, you *do*.
>
> 	   And since scp is implemented in terms of cp (for local copies) this leads to
> 	   one use of scp preserving links, and another by making files out of them! This
> 	   is unintuitive and wrong.
>
> Please change this if it already is not changed - or indicate that a patch could be
> accepted to change it. I am aware of the alternatives, such as tar and rsync. However,
> using tar requires an extra binary to be installed on a remote or local machine, and rsync
> requires an extra program to maintain, and an extra service to run(?).
>
> And I don't want an extra dependency just to shore up a deficiency in an otherwise useful
> tool.
>
> Ed
>
> (ps - if people *don't* consider this a bug, then I'd appreciate someone telling me
> why. Just from googling, I've seen people complain about this up and down, causing
> everything from GB of mistransfer to clogged traffic.
> )
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> openssh-unix-dev mailing list
> openssh-unix-dev at mindrot.org
> http://www.mindrot.org/mailman/listinfo/openssh-unix-dev
>




More information about the openssh-unix-dev mailing list