Topic "Copying files from remote side failed"

Author Message
stephan

Guest


Hello!
login was successful, but it failed to copy files from remote side. Error message: "Command failed with return code 127." How can I find out what does this code mean and what should I do?

thanks a lot!
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
stephan wrote:
login was successful, but it failed to copy files from remote side. Error message: "Command failed with return code 127."

You probably don't have "scp" or "scp1" executable available on your server. Or you have it, but it is not "in PATH".
_________________
Martin Prikryl
Guest




Hi Stephan,

I had about the same problem as you have. The solution is to install the opennssh-client on your server, the the machine is able to send you data via ssh.

CU Philipp
McTrex

Guest


stephan wrote:
login was successful, but it failed to copy files from remote side. Error message: "Command failed with return code 127." How can I find out what does this code mean and what should I do?

I had the same problem, copied scp, but now I'm getting return code 255. Any idea?

Thanx
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
McTrex wrote:
I had the same problem, copied scp, but now I'm getting return code 255. Any idea?

Please, send me a log file (via e-mail).
_________________
Martin Prikryl
Andrew

Guest


When I try and copy a file from the remote server to the local server I get error code 127 because it cannot find scp. I have checked my .profile and scp is included in my path. Also when I run a bash shell interactivey, I can find scp. So the export in my .,profile is working.

Any thoughts as to why winscp (or the openSSH server), when it starts up a bash on the remote machine isn't executing my .profile and setting my path variable?
Guest




Andrew wrote:
When I try and copy a file from the remote server to the local server I get error code 127 because it cannot find scp. I have checked my .profile and scp is included in my path. Also when I run a bash shell interactivey, I can find scp. So the export in my .,profile is working.

Any thoughts as to why winscp (or the openSSH server), when it starts up a bash on the remote machine isn't executing my .profile and setting my path variable?


Just ignore my question - I figured it out. I needed to create a file called ~/.ssh/environment and set my PATH variable there.
rsn

Guest


I'm having the exact same problem...
Igor

Guest


Any attempt to copy a file from the remote host (Linux Red Hat 7.2) results in the error message "Command failed with return code 1). I did read all relevant posts in this forum, scp IS in my path on the server etc. What I understand is that WinSCP runs scp on the server. Then this may be the reason of my problem. My windows host is connected to the LAN via DHCP, taking the IP from a pool of fictional IPs (we are short of IPs here). Thus scp on the server will not work with this connection lacking a real IP address. I need to run scp on the receiving host. This is what I actually do when I boot it in Linux.

Any workaround? Or should I forget about WinSCP?

Thank you,
Igor
bartek

Guest


Hi folks,
I saw some notes about returningn erro code 255 after trying transfering a files, but I couldn't find any response to this topic.
can you help me with that, because I have the same problem (after correct loggin in, i can see list of files in a remote directory, but i cannot download anything - there is error code no 255)

bartek
Toby Scanlan

Guest


Tried your advice with ~/.ssh2/environment file to no avail. PATH include /usr/local/bin/... but doesn't appear to source this file any recommendations? Or do I need to create a separate ~/.ssh/environment dir?

Thanks,
Toby Scanlan

Anonymous wrote:
Andrew wrote:
When I try and copy a file from the remote server to the local server I get error code 127 because it cannot find scp. I have checked my .profile and scp is included in my path. Also when I run a bash shell interactivey, I can find scp. So the export in my .,profile is working.

Any thoughts as to why winscp (or the openSSH server), when it starts up a bash on the remote machine isn't executing my .profile and setting my path variable?


Just ignore my question - I figured it out. I needed to create a file called ~/.ssh/environment and set my PATH variable there.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
These days, one should use SFTP instead of SCP. SFTP is default anyone in recent versions of WinSCP.
_________________
Martin Prikryl
Ruben

Guest


Hi all

Im working with WinScp for long time ago and until today 0 problems. But yesterday I tried to upload some files from Windows workstation to Linux Server by WinScp(SCP mode) and i got errors.

I thought that the problem was the PATH of user(no-root user) but today I test the user's PATH connecting me to Linux and i had scp in PATH.

But when I tested scp command shell returned

"You don't have permissions in /dev/null"

So i check this file and had 644. I chmod 666 and then tried again to use WinSCP and finally I successful upload the file.

Interesting Smile

Bye Bye
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Ruben wrote:
Im working with WinScp for long time ago and until today 0 problems. But yesterday I tried to upload some files from Windows workstation to Linux Server by WinScp(SCP mode) and i got errors.

I thought that the problem was the PATH of user(no-root user) but today I test the user's PATH connecting me to Linux and i had scp in PATH.

But when I tested scp command shell returned

"You don't have permissions in /dev/null"
...

Thanks for sharing your experiences. I have expanded the respective documentation chapter a bit.
_________________
Martin Prikryl
Kashif farooq

Guest


thanks Martin,

i have changed it from FTP to SFTP and it works
Guest(JohnsonChuang)

Guest


I tried to use Winscp 4.19 or lower version, it works fine for me. Smile Smile Smile
franc
[View user's profile]
Donor
Joined: 2007-05-12
Posts: 46
I had this problem with a Synology DiskStation DS212j, the included ssh is crippled.
So I installed ipkg, then with ipkg I installed openssh, configuring this just to hear on another port (other than the included ssh service), but this not neccessary I guess, just client needed, and now I can use it with WinSCP using File protocoll SCP.
Dev' ill Eyes

Guest


Hi,

I also got an error on copying to remote side. The file can be copied sometimes but the size is 0, or the file would reach upto 60% or below then this error message will appear. (attached image)

General failure (server should provide error description).
Error code: 4
Error message from server: Failure
Request code: 6


Kindly help me what to do please?
I don't know what that error means.
Error.png (26.77 KB)

Description: (none)

Error.png

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
Dev' ill Eyes wrote:
Hi,

I also got an error on copying to remote side. The file can be copied sometimes but the size is 0, or the file would reach upto 60% or below then this error message will appear. (attached image)

General failure (server should provide error description).
Error code: 4
Error message from server: Failure
Request code: 6


Kindly help me what to do please?
I don't know what that error means.

Please attach a full log file showing the problem (using the latest version of WinSCP).

To generate log file, enable logging, log in to your server and do the operation and only the operation that causes the error. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.

See also https://winscp.net/eng/docs/sftp_codes
_________________
Martin Prikryl
nhan.nguyen

Guest


Just change ftp to sftp Laughing
SteveMcG

Guest


I can login to a remote site and see the directory that I want to download to my workstation. If I choose the Synchronize option, it does start to download the entire directory. I only want to copy over a subset, which I hilited by using the Shift key to pick the first and last file I want to include but WinSCP seems to ignore this. In any event, I see that doing the download in this way does appear to work. If I pick a single file(or multiple) and try to drag and drop it over to my own directory I get a popup that says 'C:\temp\vm63\' is not file! . The C:\temp\vm63 is a valid path on my workstation. I am using WinSCP Version 5.7.4 (Build 5553). Also, I don't know if it matters or not but the remote site accepts the FTP protocol but not the SFTP one.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
SteveMcG wrote:
I can login to a remote site and see the directory that I want to download to my workstation. If I choose the Synchronize option, it does start to download the entire directory. I only want to copy over a subset, which I hilited by using the Shift key to pick the first and last file I want to include but WinSCP seems to ignore this. In any event, I see that doing the download in this way does appear to work. If I pick a single file(or multiple) and try to drag and drop it over to my own directory I get a popup that says 'C:\temp\vm63\' is not file! . The C:\temp\vm63 is a valid path on my workstation. I am using WinSCP Version 5.7.4 (Build 5553). Also, I don't know if it matters or not but the remote site accepts the FTP protocol but not the SFTP one.

Please start a new thread and attach a full log file showing the problem (using the latest version of WinSCP).

To generate log file, enable logging, log in to your server and do the operation and only the operation that causes the error. Submit the log with your post as an attachment. Note that passwords and passphrases not stored in the log. You may want to remove other data you consider sensitive though, such as host names, IP addresses, account names or file names (unless they are relevant to the problem). If you do not want to post the log publicly, you can mark the attachment as private.
AJ lou

Guest


we start to use sftp to copy file from local to remote side resently, sometimes works ok but other time failed. any new update for this issue?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25015
Location: Prague, Czechia
AJ lou wrote:
we start to use sftp to copy file from local to remote side resently, sometimes works ok but other time failed. any new update for this issue?

Start a new thread and attach a full log file showing the problem (using the latest version of WinSCP).
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License