Topic "can't move remote files/folders on other drive on sameserver"

Author Message
smitty123
[View user's profile]

Joined: 2014-10-26
Posts: 36
Location: Canada
hi all,

when i try to move a folder or file on my nas with winscp using either duplicate or move or drag&drop it always fails with this error:

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

but when i type in a console window: mv /share/HDA_DATA/myfolder /share/HDB_DATA

it works fine.

is this a bug or is there a setting/option that i need to set in winscp for it to work with the context menu ? i'm new here and to winscp so talk slowly (lol).
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24995
Location: Prague, Czechia
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.
_________________
Martin Prikryl
smitty123
[View user's profile]

Joined: 2014-10-26
Posts: 36
Location: Canada
Hi Martin, so sorry this took such a long time to get back to you, i never got a notificaiton email from your server.

i made a log file with winscp 5.5.6 and attached it below.

there's something interesting when i look in it, i did a move command on a single file for testing and i think i found the reason why it always fails:

. 2015-01-27 14:29:26.842 Moving file "test.txt" to "/share/HDB_DATA/hdd2/test.txt".
> 2015-01-27 14:29:26.842 Type: SSH_FXP_RENAME, Size: 71, Number: 176914

isn't the rename command only for a local file or move something on the same drive as the source ? if that's the case then a simple comparison of the source and dest drive would solve this problem.

Or better yet, 1st try rename since its faster on single drive moves, and if it fails don't show a popup but try a move instead, then if that fails show a popup.



ps: i hope you can fix the email notifications, i've been registered here for a sufficiently long time and no notifs at all. you may want to check with your isp if they have changed ports or enabled some extra security that prevents out going emails.

pps: i see there's a newer winscp version 5.6.5rc i'll do the update toute suite and see if the bug still appears...
admin@qnap.log (1.06 KB) [Download]

Description: (none)

smitty123
[View user's profile]

Joined: 2014-10-26
Posts: 36
Location: Canada
nope, no change in v5.6.5

i still can't move from one drive to the other.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24995
Location: Prague, Czechia
With OpenSSH SFTP server, you cannot move a file across file system boundaries:
https://winscp.net/eng/docs/sftp_codes#code_4

There's no difference between "move" and "rename" in SFTP.

Are you really getting the "Failure" error also for a Duplicate command? If you are, please attach a session log file for that.
_________________
Martin Prikryl
Guest




the duplicate command works tho it times-out if it's set too low but i've set it to 60 seconds and that works for small to medium files. The duplicate window shows up and displays the progress bar and its a beautiful thing.

The move just doesn't want to move. But it still needs to do the job, some there must be some ways to work around that.



ps: i received an email notifications, thanks for fixing it.
smitty123
[View user's profile]

Joined: 2014-10-26
Posts: 36
Location: Canada
Anonymous wrote:
the duplicate command works tho it times-out if it's set too low but i've set it to 60 seconds and that works for small to medium files. The duplicate window shows up and displays the progress bar and its a beautiful thing.

The move just doesn't want to move. But it still needs to do the job, some there must be some ways to work around that.



ps: i received an email notifications, thanks for fixing it.


that was me answering as guest.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24995
Location: Prague, Czechia
Quote:
The move just doesn't want to move. But it still needs to do the job, some there must be some ways to work around that.

You can use SCP protocol. It uses mv command for moving, which you claim to work.
If you need to use SFTP protocol, you can at least add a custom command with mv.
See https://winscp.net/eng/docs/custom_command
_________________
Martin Prikryl
smitty123
[View user's profile]

Joined: 2014-10-26
Posts: 36
Location: Canada
you're right the scp does move, i'll use that from now on.
smitty123
[View user's profile]

Joined: 2014-10-26
Posts: 36
Location: Canada
just a thought, since this error occurs essentially because of a limitation in the SFTP protocol and not an actual bug in Winscp, i think that would be so helpful to educate user and tell him/her to switch to SCP instead of just displaying an error #4 popup.

anyway you're so smart for having figured out it was a protocol limitation. i'm glad it's not a bug.

Now my file managing will go much smoother, Thanks Martin!
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24995
Location: Prague, Czechia
smitty123 wrote:
just a thought, since this error occurs essentially because of a limitation in the SFTP protocol and not an actual bug in Winscp, i think that would be so helpful to educate user and tell him/her to switch to SCP instead of just displaying an error #4 popup.

Thanks for the suggestion. Will consider it.
_________________
Martin Prikryl
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24995
Location: Prague, Czechia
prikryl wrote:
smitty123 wrote:
just a thought, since this error occurs essentially because of a limitation in the SFTP protocol and not an actual bug in Winscp, i think that would be so helpful to educate user and tell him/her to switch to SCP instead of just displaying an error #4 popup.

Thanks for the suggestion. Will consider it.

This issue has been added to the tracker:
https://winscp.net/tracker/show_bug.cgi?id=1285
_________________
Martin Prikryl
smitty123
[View user's profile]

Joined: 2014-10-26
Posts: 36
Location: Canada
thank you Smile
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