Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving / copying file between windows belonging to same server+user should perform entirely server-side filesystem operation #14084

Closed
porg opened this issue Jan 13, 2023 · 8 comments · Fixed by #14178
Labels
bug sftp SFTP Protocol Implementation
Milestone

Comments

@porg
Copy link

porg commented Jan 13, 2023

Reproduction

  1. Open a new window and connect to a SFTP host.
  2. You get a listing, e.g.: dir-a, dir-b, dir-c.
  3. Right click dir-a → "New browser".
    • This opens a new browser window (instance) on the SAME server as the SAME user.
  4. In your first open window, navigate into dir-b.
  5. Copy file1.mp4 from dir-a to dir-b.

Expected: This happens in an instant.

  • Cyberduck realizes this is the SAME filesystem on the SAME server with the SAME user and hence just triggers server-side filesystem move operation move file1.mp4 from dir-a to dir-b.
  • Move operation: Even if a multi gigabyte file this happens in an instance (as just the filesystem TOC gets rewritten).
  • Copy operation:
    • Server uses Copy on write (CoW) filesystem: This also happens in an instant.
    • Server does not use a Copy on write (CoW) filesystem: Happens with local HDD/SSD I/O speed, which almost always will be faster than any duplex network transfer (download to client and re-upload to server).

Actually: This is painfully slow

  • As Cyberduck performs a download of file1.mp4 from dir-a to your computer's /tmp/ directory and then re-uploads file1.mp4 to dir-b on the server.

Best Practises

  • This is technically possible and available in other FTP software.
  • I tried the Transmit trial version and there you can easily copy between windows which belong to the same server in that fashion (file move operations run entirely server side).

Workaround

  • Use only a single Cyberduck window.
  • Use the folder-tree to expand dir-a and dir-b and then drag-n-drop file1.mp4 from dir-a to dir-b.
  • This works, but can be quite cumbersome in setups with long directory/file-lists.
  • Lots of scrolling up and down… you gather many mouse kilometers…
@dkocher dkocher added the sftp SFTP Protocol Implementation label Feb 3, 2023
@dkocher
Copy link
Contributor

dkocher commented Feb 3, 2023

Testing this with 8.5.5 (39213) on macOS.

Footnotes

  1. Documentation update pending for other protocols supporting server side copying

@porg
Copy link
Author

porg commented Feb 3, 2023

Thanks for the link to the documentation!

Interestingly my testing experience is contrary to yours

Environment

  • Client: Cyberduck 8.5.5 (39213) on macOS 11.7.3 Big Sur
    • Maybe my elder macOS?
  • Server: SFTP, on custom port (5-digits, assigned by my webhost), authentication with SSH key
    • Maybe that particular protocol and configuration?

Tests

Dragging a file from one browser window to the other

Maybe the whole thing is a client side GUI/interaction bug? Long before it reaches the network protocol functions? I have this suspicion due to this observation:

  • No modifier key held: During dragging mouse pointer shows with the extra "+" (plus) symbol.
    • ❗️ Correct for move operation would be just the normal mouse pointer.
  • Holding down ⌥ (or ⌘ alternatively as an experiment) that does NOT change the mouse pointer.
    • ❗️ Also contrary to documentation and usual macOS conventions.
  • Whatever modifier key you use (none, ⌥ , ⌘ ) → Transfer goes through client!
    • ❗️ "Transfer" window shows so. Does not happen server side.

⌘-X and ⌘-V not working at all

  • Focus in window 1.
  • File selected in window 1.
  • ⌘-X
    • ✅ Menu bar > "Edit" flashes shortly.
  • Focus in window 2
  • Either nothing selected or any file selected (makes no difference).
  • ⌘-V.
    • ❌ Nothing happens. 👉 I hear the standard macOS error beep sound.
  • Further tests/observations.
  • Focus still in window 2.
  • I go to: Menu > Edit: Interestingly Paste ⌘ V is shown as inactive (greyed out)
    • Again: Cyberduck seems to "forbid" that for some reason.
  • Focus back to window 1.
  • Menu > Edit: Paste "filename-that-i-had-cut.png" ⌘ V is shown normally.

⌘-C and ⌘-V not working at all

  • Focus in window 1.
  • File selected in window 1.
  • ⌘-C
    • ✅ Menu bar > "Edit" flashes shortly.
  • Focus in window 2
  • Either nothing selected or any file selected (makes no difference).
  • ⌘-V.
    • ❌ Nothing happens. 👉 I hear the standard macOS error beep sound.
  • I go to: Menu > Edit: Interestingly Paste ⌘ V is shown as inactive (greyed out)
    • So Cyberduck seems to "forbid" that for some reason.
  • Focus back to window 1.
  • Menu > Edit: Paste "filename-that-i-had-copied.png" ⌘ V is shown normally.

@porg
Copy link
Author

porg commented Feb 3, 2023

Please also note: When I do all of the above in a single window, then all operations work normal.

Move operation

  • ⌘-X, go into other folder, ⌘-V
  • Drag'n'drop into folder with no modifier key
  • Outcome of both methods → ✅ Immediate server side move operation.

Copy operation

  • ⌘-C, go into other folder, ⌘-V
  • Drag'n'drop into folder with ⌥ key held
  • Outcome of both methods → ✅ Transfer clearly goes through the client.
    • Note: "Transfer" window shows nothing.
    • But status bar on window bottom shows spinner plus Copying "filename-that-I-dropped.png"
    • And my Network monitoring shows the traffic corresponding to file size..
    • 💡 Ofc I would prefer this to happen server side too. But if the protocol ain't allowing it, so be it.

@dkocher
Copy link
Contributor

dkocher commented Feb 3, 2023

Thanks for your concise report, I can now reproduce. The workaround is to

  • Open a new browser window (⌘-N)
  • Connect to the same bookmark

@dkocher dkocher added the bug label Feb 3, 2023
@dkocher dkocher added this to the 8.5.6 milestone Feb 3, 2023
@dkocher
Copy link
Contributor

dkocher commented Feb 3, 2023

Regression from #2596.

dkocher added a commit that referenced this issue Feb 3, 2023
@dkocher dkocher linked a pull request Feb 3, 2023 that will close this issue
@porg
Copy link
Author

porg commented Feb 3, 2023

Haha! Finally found something

  • Your proposed workaround (by itself alone) did not help.
  • But I found one way!

Currently only way to perform file move/copy operations between two windows of the same server.

  • Close all browser windows.
    • 👉 So that automatic window restoration on startup does not interfere! Makes the difference!
  • Quit Cyberduck.
  • Start Cyberduck.
    • No windows are open now.
    • Note: In my recent scenario tests my window 1 was mostly/always a restored window (👍 so convenient to continue in the same working directory as last time, great feature 👍 ).
  • Then open new window 1, then open new window 2.
  • ✅ All operations work as expected for the protocol type.

Tried another variation of this, which sadly does not work

  • Close all windows.
  • Restart Cyberduck.
  • Open window 1.
  • Browse somewhere.
  • Right click directory → New Browser → Opens window 2.
  • Now between window 1 and 2 we have the same problems as initially described.

TL;DR: So currently only works like this:

  1. Close all windows. Restart Cyberduck.
  2. New Window 1, browse to source path.
  3. New Window 2, browse to destination path.
  4. Perform your file copy/move operations.
  5. Note: Closing all windows and then proceeding to °2 (two fresh windows) worked in some instances! In doubt you must proceed to °1 (a "clean slate" restart).

@porg
Copy link
Author

porg commented Feb 16, 2023

  1. Great that your pull requests get proper code review and expert discussion.

  2. But please don't forget about the second part: For optimal co-operation with your bug-reporters, software-testers, etc, please add a proper close comment, so that your submitter knows what was fixed (all, parts, still some limitations, etc) and whether any further software testing is expected or would be appreciated.

My concrete question: After this fix copy/move operations on the same server with the same protocol between multiple browser window instances work, regardless how the windows get into existence?

@porg
Copy link
Author

porg commented Feb 20, 2023

Please re-open!

  • Tested Cyberduck 8.5.6 (39394)
  • macOS 11.7.4 Big Sur
  • Server: SFTP, on custom port (5-digits, assigned by my webhost), authentication with SSH key

Test scenarios and their outcome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug sftp SFTP Protocol Implementation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants