Subject: bug#23213: closed (Re: bug#23213: cp command with -P option odd behavior over ssh)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 04 Apr 2016 14:58:02 +0000

Your bug report

#23213: cp command with -P option odd behavior over ssh

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
23213: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=23213
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#23213: cp command with -P option odd behavior over ssh
From: Paul Eggert <[email-masked]>
To: Kousik Mandal <[email-masked]>, [email-masked]
Date: Mon, 4 Apr 2016 07:57:40 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

On 04/04/2016 04:12 AM, Kousik Mandal wrote:
> [user1@test~]$ ssh user1@testsh -c  'cp -vPprf /tmp/123 /tmp/4576'

ssh -c takes a cipher-spec as an operand, not a command.

Subject: cp command with -P option odd behavior over ssh
From: Kousik Mandal <[email-masked]>
To: [email-masked]
Date: Mon, 4 Apr 2016 16:42:57 +0530
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi Team,

In Linux system, I have created /tmp/123 directory.
---snip---
mkdir -p /tmp/123
---snip---

/tmp/4576 is a non existent directory, now I am executing following cp
command
---snip---
cp -vPprf /tmp/123 /tmp/4576
`/tmp/123' -> `/tmp/4576'

ls /tmp/4576
123
---snip---

So above command is successfully copied directory 123 under /tmp/4576

Now I am trying to execute the same command over ssh

----snip---
[user1@test~]$ ssh user1@testsh -c  'cp -vPprf /tmp/123 /tmp/4576'
user1@test's password:
cp: missing file arguments
Try `cp --help' for more information.
----snip---

but it's always failing. I have tried the same command on multiple Linux
system and found same failure.

Can you please help me why it's failing?
Is it a bug with cp -P option?
Are there any workaround mean any kind of configuration change is needed to
get it work?

Thanks,
Kousik