Thank you so much for your help. Definitely will be taking a look at it when I have the chance. It’s so shocking to me that this bug has been floating around for so long in the FOSS community no nobody has done anything to fix that considering that samba is much more used than NFS.
I keep looking deeper and it’s been reported many times for a long time now.
Also see this at the bottom:
bugs(dot)kde(dot)org/show_bug.cgi?id=98886
That bug is related to cpying/moving from one server to ANOTHER, witch is not what you are trying to do, at all.
Maybe other distros would mount it for you directly more like windows, I actually don’t know, but in manjaro you have to mount it for this to work.
Simple operations (like editing a file, creating a directory, copying between OTHER locations and the server etc) can be done by just "mounting it in dolphin"each time, but if you want do do what you are trying and also have a stable connection to the server, that is always the same, not changing the temporary path, then mounting is what you have to do (or use smb4k, witch I didn’t even know about until it was mentioned in this thread).
Edit.
Arguably reading the bug report and others around it there is something underlying that might be related to this, but if I were to guess, nobody really cares because everybody mounts what they want to use anyway. And its also arguably a KDE thing, not a Manjaro thing. xD
As someone in one of the reports wrote in 2013
We aren’t fans of “show stoppers”, but unless anyone with Samba knowledge volunteers to debug and fix this, I’m afraid that nothing will change.
That is probably still the case, I guess nobody cares. Sorry
I can reproduce this issue when using Dolphin with two different samba shared folders, any files can’t be moved from samba folder A to samba folder B in the same Dolphin.
If I open two separate Dolphins, I move any files from Dolphin with samba folder A to other Dolphin with samba folder B. That works!
Can you open two separate Dolphins, try to move any files from Dolphin A to Dolphin B?
Other solution is also possible that you open two separate tabs in the same Dolphin, try to move any files from tab A to tab B in the same Dolphin.
tl:dr
In my experience:
Move file from Samba folder A to Samba folder B in the same Dolphin.
Move file from Dolphin A with Samba folder A to Dolphin B with Samba folder B.
Move file from Tab A with Samba folder A to Tab B with Samba folder B in the same Dolphin.
That’s interesting. How did you mount your shared folder?, because mine was a matter of typing smb://ip_address on Dolphin address bar.
Also, it’s not like I have two shares mounted, it’s just one mounted folder with many folders inside, the problem comes when I try moving files between those folders inside that unique share.
My samba server is running Truenas scale which Debian based.
sudo mount -t cifs -o noauto,nofail,x-systemd.automount,x-systemd.requires=network-online.target,x-systemd.device-timeout=10,credentials=/root/mediacred,uid=<username>,gid=<username> --source //192.168.1.4/books --target /run/media/<username>/Books
The above is included in a bash script that is called by Sytemd on start up, but I can close also explicitly close the shares when not connected to my file server.
This is to ensure that the directories exists under /run (it’s a tempfs directory), so there is no guarantee the required directories are there at run time.
I store the credentials for the Samba user in /root
I use the bash script because I can optionally call it manually, if at anytime I have explicityly closed those with the following commands… also in another bash script.
All of that can be done with one command if using systemd, one time.
Depending on how you want to mount them, you use .automount or .mount
The --now tag is optional, it also starts/stops the unit.
If you for some reason want the mount to be in a directory that might not exist when mounting, add x-mount.mkdir to the mount options in the .mount file.
If you want your user to own the directories, add uid=USERNAME and gid=USERNAME to the mount options.
If you add them to fstab the procedure is exactly the same as yours, but instead of calling a script you use sudo mount -a.
Just add auto to the mount options in fstab.
One of the really nice thing about using systemd.mount is that everything gets logged to journalctl, so if something goes wrong, it’s usually very easy to track.
I think you missed the point, The journaling is great, but I can also explicitly umount my shares, by calling another script, when I take my laptop out and about, and explicitly remount them when back at my desk.
I like it my way. I’ve had several iterations of mounting samba shares, across multiple Distros, including the fstab method.
Not at all, I completely understand what your script does.
I posted above how to achieve that with both fstab and systemd, one command to unmount and one to mount.
Thats great!!
Just wanted to clarify that all of that is doable with built in systems without the need for a script.
Until now I - and likely other members - percieved this as an issue using two separate mounts as per your title
Cannot move files between SMB shared folders with Dolphin
With Linux you don’t always get a fix - but have to learn to work around it - such as scripting.
What if you implement the share as a script - something like @tracyanne mention or something like the script I linked earlier - something you can easily switch on and off as required?
EDIT:
For the sake of completeness - I have tested a setup similar to yours - for obvious reasons I cannot mimic your system.
I created a proof-of-concept samba server from scratch [1] using a full setup with users, permissions - everything needed to mimic an office like setup.
Using dolpin on my workstation - I made a connection to the service
Upon navigating the shared data folder - service requires credentials
I provided admin credentials as setup for the service
I navigated into the structure /data/public/
I created two folders /data/public/folderA and /data/public/folderB
I added the folders to the places pane using drag’n drop - folderA and folderB
I dropped a file from my system /desktopfs-pkgs.txt onto folderA in the places pane
I navigated into folderA and dragged the file desktopfs-pkgs.txt
I dropped the file onto folderB in the places pane
During this simple proof-of-concept I have not been able to reproduce the issue described in your initial topic.
I know this comment won’t bring you further to a solution as I have no idea why are having the issue and not being able to reproduce - one is left to speculate …