I am running cygwin virtualbox running a WinDev2206Eval "appliance" (.ova
from microsoft).  Everything else I've tested so far in cygwin runs as
expected except scp when the <source> file path is an absolute path, e.g.
/tmp/foo.  Scp <source> references to that file using a relative path, e.g.
../../tmp/foo, work fine.  For example:

$ ls > /tmp/foo   # create a /tmp/file
$ ls -l /tmp/foo
$ scp /tmp/foo bcserver:foobar  # fails with /tmp/foo "file not found"
$ pwd    # (CWD is /Users/dmk)
$ scp ../../tmp/foo bcserver:foobar   # this works
$ cd /tmp
$ scp foo bcserver:foobar   # this also works

Please see the attached (script) log file scp.log for the actual results
using these commands.
See also the attached cygcheck.out file.

Note that:

  1 -  absolute paths work OK for an scp <destination> pathname

  2 - the "scp /tmp/foo bcserver:foobar" command works OK in win11's
PowerShell

  3 - the scp target host (bcserver) is a FreeBSD 12 OS running in a
TrueNAS "jail".
Script started on 2022-07-16 05:37:23-07:00 [TERM="xterm" TTY="/dev/pty0" COLUMNS="80" LINES="24"]
[?2004h]0;~

dmk@WinDev2206Eval ~

$ which scp
[?2004l
/cygdrive/c/Windows/System32/OpenSSH/scp
[?2004h]0;~

dmk@WinDev2206Eval ~

$ ls
[?2004l
cygcheck.out   scp.log		   tst_ctlm	 tst_rep       tst_tag%bar
dailyPrayers%  test_DOSfmt	   tst_info	 tst_rep%      tst_tag%foo
foo	       testing		   tst_info%xxx  tst_rep%foo
foo11138       testing.standalone  tst_misc	 tst_rep%foo%
foo3162        tst_bug		   tst_ncoAll	 tst_tag
[?2004h]0;~

dmk@WinDev2206Eval ~

$ ls > /tmp/foo
[?2004l
[?2004h]0;~

dmk@WinDev2206Eval ~

$ ls -l /tmp/foo
[?2004l
-rw-r--r-- 1 dmk None 228 Jul 16 05:37 /tmp/foo
[?2004h]0;~

dmk@WinDev2206Eval ~

$ scp /tmp/foo bcserver:foobar
[?2004l
[?25h/tmp/foo: No such file or directory
[?2004h]0;~

dmk@WinDev2206Eval ~

$ pwd
[?2004l
/home/dmk
[?2004h]0;~

dmk@WinDev2206Eval ~

$ scp ../../tmp/foo bcserver:foobar
[?2004l
[?25hfoo                                             0%    0     0.0KB/s   --:-- ETA
foo                                           100%  228     7.2KB/s   00:00    
[?2004h]0;~

dmk@WinDev2206Eval ~

$ cd /tmp
[?2004l
[?2004h]0;/tmp

dmk@WinDev2206Eval /tmp

$ scp foo bcserver:foobar
[?2004l
[?25hfoo                                             0%    0     0.0KB/s   --:-- ETA
foo                                           100%  228    14.2KB/s   00:00    
[?2004h]0;/tmp

dmk@WinDev2206Eval /tmp

$ ssh bcserverer ls -l foobar
[?2004l
[?25h-rw-r--r--  1 dmk  dmk  228 Jul 16 08:39 foobar
[?2004h]0;/tmp

dmk@WinDev2206Eval /tmp

$ [?2004l

exit

Script done on 2022-07-16 05:40:24-07:00 [COMMAND_EXIT_CODE="0"]

Attachment: cygcheck.out
Description: Binary data

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to