Copying files from remote side failed

Advertisement

stephan
Guest

Copying files from remote side failed

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!

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
27,459
Location:
Prague, Czechia

Re: copying files from remote side failed

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

Reply with quote

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

Reply with quote

McTrex
Guest

Re: Copying files from remote side failed

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

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,459
Location:
Prague, Czechia

Re: Copying files from remote side failed

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

Reply with quote

Andrew
Guest

Error code 127 revisited

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?

Reply with quote

Guest

Re: Error code 127 revisited

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.

Reply with quote

Igor
Guest

copying fails, DHCP problem?

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

Reply with quote

bartek
Guest

error code 255

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

Reply with quote

Toby Scanlan
Guest

Re: Error code 255 revisited

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.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,459
Location:
Prague, Czechia

Solution

These days, one should use SFTP instead of SCP. SFTP is default anyone in recent versions of WinSCP.
_________________
Martin Prikryl

Reply with quote

Ruben
Guest

Equal problem [SOLVED]

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 :)

Bye Bye

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,459
Location:
Prague, Czechia

Re: Equal problem [SOLVED]

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

Reply with quote

franc
Donor
franc avatar
Joined:
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.

Reply with quote

Dev' ill Eyes
Guest

Copying files to remote side failed

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

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,459
Location:
Prague, Czechia

Re: Copying files to remote side failed

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

Reply with quote

SteveMcG
Guest

Download failure

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.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,459
Location:
Prague, Czechia

Re: Download failure

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.

Reply with quote

AJ lou
Guest

sftp copying file to remote side failed.

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?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,459
Location:
Prague, Czechia

Re: sftp copying file to remote side failed.

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).

Reply with quote

Advertisement

You can post new topics in this forum