Extremely annoying behavior with SSH recycle bin

Advertisement

redneonglow
Joined:
Posts:
10

Extremely annoying behavior with SSH recycle bin

Hi,

I've used WinSCP for a long time, but the SSH recycle bin does something completely annoying. I don't know if this is a bug or a feature, but I'd love to see it removed.

If you have an SSH recycle bin and enable the "overwrite to recycle bin" option, and you are overwriting files to a partition which is not the same partition as the recycle bin directory is on (such as an external drive on /mnt/something or /media/something), an infinite loop of weird errors are given with the option to Abort, Skip, Retry, etc. Only "Abort" works, and then you have to go into settings and disable the "Overwrite to recycle bin" and start over.

I've had this issue on every SFTP connection I use, including on both LAN and Internet transfers.

Again, I'm not sure if this is a bug or a feature, but it is extremely annoying, and should be fixed IMO.

Thank you, Red

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,430
Location:
Prague, Czechia

Re: Extremely annoying behavior with SSH recycle bin

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

To generate the session 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

redneonglow
Joined:
Posts:
10

I made a mistake in the original message, this is not an external drive, it is a non-LVM LUKS encrypted drive with partition type ext4 and mounted to /mnt/(REMOVED).

Here is the relevant part of the log file, uploaded to the forum in private mode. "Retry" is selected twice, followed by "Abort." The mount point of the drive has been replaced with (REMOVED) and the username replaced with (USER).
  • winscp-overwriteprob-censored.txt (6.46 KB, Private file)
Description: Here is the relevant part of the log file, uploaded to the forum in private mode.

Reply with quote

redneonglow
Joined:
Posts:
10

martin wrote:

OK, but you should press Skip, not Retry or Abort. What behaviour do you get with Skip?

After "Skip" I get "Cannot overwrite remote file, Press "Delete" to delete the file and create new one instead of overwriting it." Again with the same Error 4 listed.

Pressing "Delete" does nothing and gives me the same message from before. Skip, Delete, Skip, Delete...

Reply with quote

Advertisement

redneonglow
Joined:
Posts:
10

Actually it moves on to the next file if I press "Skip" twice.

Here is the relevant part of the log, uploaded privately, with the personal information removed as mentioned above.
  • winscp-recyclebin-skip-censored.log (17.62 KB, Private file)

Reply with quote

Advertisement

martin
Site Admin
martin avatar

redneonglow wrote:

I still have the same problem with the development version.
Can you please respond to my email and send me a new session log file?

Reply with quote

redneonglow
Joined:
Posts:
10

Here is a log file of the new development version, with the same things "(REMOVED)" involving the transfer and attempt to overwrite files. In each of the three files, I do "retry" twice followed by "skip" once.
  • bunker-developmentver-20190716.log (28.15 KB, Private file)

Reply with quote

martin
Site Admin
martin avatar

I'm not sure I understand, what problem do you see now.
The file could not be moved to the recycle bin. You got a message about that. You retried the move twice, what could not help. Then you skipped the move and the file was successfully overwritten and uploaded. That's the expected behavior. What did you expect differently?

Reply with quote

redneonglow
Joined:
Posts:
10

martin wrote:

I'm not sure I understand, what problem do you see now.
The file could not be moved to the recycle bin. You got a message about that. You retried the move twice, what could not help. Then you skipped the move and the file was successfully overwritten and uploaded. That's the expected behavior. What did you expect differently?

Why would an error message where you have to click "skip" move the file? To my knowledge "skip" would skip that file and attempt to move the next one. The file was overwritten after clicking "skip"? That's not good.

Again in all other cases, I have no error message when attempting to overwrite files. But I'd imagine it would be universal that "skip" on an error message would skip the operation.

Reply with quote

Advertisement

martin
Site Admin
martin avatar

The message is to inform you that the overwritten version of the file will be lost (in case you expected it to be moved to the recycle bin).

The "Skip" here means that the "move to recycle bin" operation will be skipped. The message does not say anything about an upload/overwrite.

Reply with quote

redneonglow
Joined:
Posts:
10

martin wrote:

The message is to inform you that the overwritten version of the file will be lost (in case you expected it to be moved to the recycle bin).

The "Skip" here means that the "move to recycle bin" operation will be skipped. The message does not say anything about an upload/overwrite.

Oh OK.

Why won't it move the file to the recycle bin though? That's what I want it to do.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
40,430
Location:
Prague, Czechia

redneonglow wrote:

Why won't it move the file to the recycle bin though? That's what I want it to do.
Because you cannot move files between partitions.
WinSCP would have to download the file and upload it back to the other partition, what you probably won't like (if WinSCP even had a way to find out that the file is on different partition than the recycle bin, what it does not).

Reply with quote

redneonglow
Joined:
Posts:
10

martin wrote:

redneonglow wrote:

Why won't it move the file to the recycle bin though? That's what I want it to do.
Because you cannot move files between partitions.
WinSCP would have to download the file and upload it back to the other partition, what you probably won't like (if WinSCP even had a way to find out that the file is on different partition than the recycle bin, what it does not).

From the eyes of WinSCP, what's the difference between copying a file from /home/user/Documents to /home/user/recyclebin and copying a file from /run/media/user/jumpdrive to /home/user/recyclebin?

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
40,430
Location:
Prague, Czechia

redneonglow wrote:

From the eyes of WinSCP, what's the difference between copying a file from /home/user/Documents to /home/user/recyclebin and copying a file from /run/media/user/jumpdrive to /home/user/recyclebin?
First, this is about moving, not copying. Those are two very distinct operations (and even more so, in the context of this question).
There's no difference in the "eyes of WinSCP". But that's irrelevant. It's the server that does the move. And in the "eyes of a server", you cannot move a file to another file system (as the very existence of this topic proves).

Reply with quote

redneonglow
Joined:
Posts:
10

martin wrote:

redneonglow wrote:

From the eyes of WinSCP, what's the difference between copying a file from /home/user/Documents to /home/user/recyclebin and copying a file from /run/media/user/jumpdrive to /home/user/recyclebin?
First, this is about moving, not copying. Those are two very distinct operations (and even more so, in the context of this question).
There's no difference in the "eyes of WinSCP". But that's irrelevant. It's the server that does the move. And in the "eyes of a server", you cannot move a file to another file system (as the very existence of this topic proves).

And this "server move" which WinSCP uses is something different than the normal mv command?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
40,430
Location:
Prague, Czechia

redneonglow wrote:

And this "server move" which WinSCP uses is something different than the normal mv command?
The common *nix mv command moves the files, when they are on the same file system. This is the same operation that SFTP server "move" functionality does.

But then they are not, it does not (cannot) move the files. It copies the files and then deletes the original. Most SFTP servers do not support "copy" operation.
See https://winscp.net/eng/docs/protocols (section "Direct File duplication").

Reply with quote

Advertisement

You can post new topics in this forum