Question about Samba shares

Hi there,

I've got a little technical question for you guys.

I've got several Samba mount points setup on one of my servers where my files are shared. I use my main laptop to browse and manage those files. I'd like to know what happens when I "remotely" move one file from one Samba mount point to another one (1 Samba point = 1 physical hard drive partition on the same computer)? I mean:
1- The file is downloaded on my laptop and then uploaded to the new mount point (task managed by the remote computer)
Or 2- The file is directly moved to the target mount point (task managed by the Samba server)

I ask because it seems I'm having serious performance trouble in this situation (moving several files from one partition to another is way slower using Samba shares than directly on the computer)...

Thanks for your help guys :smiley:

The file is downloaded to your local machine and then uploaded. AFAIK the SMB protocol doesn't provide any way to move (rename) files across shares.

Oh man that's what I was afraid of.

So, I didn't check yet but what informations can I get from files using the DOpus SDK? For eg. can I get selected files path and context (for eg. the network shares owner of the file)? Path of active views?

I ask because I have develop a WebService which allows me to execute filesystem task remotely and I would like to plug it to DOpus nicely. For eg. adding an item in the menu which popups when we drag and drop files using the right mouse button ("Execute using WebService"), and sending a command with the context, the selected files, the drag source path and the drop target path as an input, in order to process the request directly on the server (skipping Samba). Does it seems crazy to do in DOpus? If so, I guess I would have to implement a basic drag & drop feature and try to match the absolute file source path from DOpus to the remote samba share or something like that...

Thanks again! :stuck_out_tongue:

I don't think you need to use the Opus SDK to achieve this. I would implement your solution as a simple command line program, or as a drag-drop shell extension handler, or both.

For the command line program, you would invoke it from an Opus button or hotkey as follows:

MyMagicMoveProg.exe {d} {f}

This would pass the destination path as the first argument, and the full paths of all selected files as the second and subsequent arguments.

If you implement it as a drag-drop shell extension then you could move files by drag and drop using the right mouse button (you could achieve this in Opus using just the program version, but if you implement it as a shell extension then it would work in Explorer as well.)

Ok thanks a lot for your replies. I guess I will follow your first hint, seems pretty simple that way (using SSH connections to send remote commands).

Last question, the unsupported move command between two Samba shares is just a Samba problem, right? The same command on real Windows shares will be correctly done (I mean without the useless download/upload)?

AFAIK it's not just Samba; it's all network shares that use the SMB protocol (i.e. all Windows or Samba network shares).

I just checked and Explorer on Vista will do a copy-then-delete (not a rename) when moving between two shares which point to the same partition on the local machine. I think I read that SMB doesn't support any way to rename files between shares even if they are shares on the same partition.

Ok thanks a lot for your explanations and your time leo. I guess we are in another situation where the filemanager comes to the rescue of the user :slight_smile:

I really need an effective solution here, so I will take some time to find an acceptable scenario (specifics software which sends remote SSH commands from DOpus, or using the SDK with a VFS based on a remote WS to avoid using SMB protocol).

Opus with the advanced FTP module will let you move files around servers you have SSH logins to.

Alternatively, if you want to automate/script SSH stuff then the PuTTY suite has some tools which are worth looking at.

I tried using Opus FTP connections and I get errors when I move files from one mount point to another. Eg:

/media/a is a mount point to a FUSE FS
/media/b is a mount point to a FUSE FS

When I move files within /media/a or /media/b no problem. But when I try moving files from /media/a to /media/b I get an error from Opus "File not found".

I even found something interesting and I get the same error in the same situation through Opus and Explorer.

So I guess it's more a problem of the FUSE FS I use behind than the filemanager itself.

Here I am:

  • SMB is way too slow for cross partitions moves
  • NFS doesn't work on my shares (which use a FUSE FS)
  • SSH client (using SFTPDrive or WinSCP or other) don't work for coss partition moves
  • FTP neither, feel like I'm stuck. I can't believe this is so complicated. I have to finish my WebService and continue my Opus VFS plugin. I already get some results: listing of directories works.

I think my WS idea is a great solution because:

  • it works on any OS (Mac, Linux, ...)
  • it's independent from the FS implementation (like FUSE)
  • it's firewall compliant (management of remote files through Internet will be possible)

Just wondering if you ever found your solution? It sounds like something I would be interested in using myself although I don't understand all the protocol talk what I do know is that when I copy from one Windows server share to another share on the same server using my laptop it's ssssslllllllllooooooooowwwwwwwww but if I use a remote desktop connection I can save a lot of transfer time but what a pain to have to logon find the file blah...blah...blah.