Smb file transfer stuck since Stable Update 2024-11-30

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.

Opened as per OP’s request. :wink:

Thanks again and Happy New Year!

Why is cifs okay here if it shouldn’t be used?

So I used your mount/automount combo with the _netdev option. To access the shares, I am currently entering /mnt/RemotePC/Disk1 or smb://RemotePC/Disk1 in the location bar, but both variants have issues - how should I access the shares?

In Dolphin and PCManFM:
/mnt/RemotePC/Disk1 : only “Copy” is available, no Cut/Paste.
smb://RemotePC/Disk1 : Copy/Cut/Paste available, but credentials are required each time

Dolphin:
/mnt/RemotePC/Disk1 : if the remote computer is on, the remote drives show up and quickly vanish again from the “Remote” section of the places bar. It is impossible to unmount the drives (“umount: … must be superuser to unmount.”). I want my drives to be only mounted when accessed directly, not when opening just the parent directory /mnt/RemotePC/ to prevent the hard disks from spinning up unnecessarily.
smb://RemotePC/Disk1 : remote drive not displayed in the places bar

PCManFM:
/mnt/RemotePC/Disk1 : directory opens normally, but vanishes after about 10s (just switches back to home directory). It stays in the directory if I copy something but once copying is finished, it switches back to home.
Is that from the TimeoutIdleSec=10? How do I keep the directory open as long as I am looking at it?
smb://RemotePC/Disk1 : there is a user/password prompt every time even if I choose “Remember forever” and despite the mount file pointing to the credentials file. The drive shows up in the devices section and unmounting with the eject button seems to work.

Re: When using the CIFS entries in /etc/fstab:

This is purely anecdotal;

to illustrate that shares via Dolphin (using Samba, properly configured) should produce the same as you describe;
with no network locations mounted in /etc/fstab;

Screenshot_20250105_135325

Why they are not as easily configurable for you, I can’t say.

Regards.

Just something that stuck from a long time ago.

cifs is a server communication between smb1 and smb2.

yet the linux utils is still named cifs-utils and the mount type is still named cifs.

Your issue is because you do not understand how this works.

Access the mountpoint and the share is mounted automagically.

Remove all your useless shortcuts pointing to network locations - create shortcuts to your - mountpoints instead.

Try reading the articles on the subject - start with the primer

When you understand the concept, I created a collection of sample mount units - with a corresponding automount

Yes the appear in dolphin, but they also vanish after 10 sec, and if I create a bookmark for /mnt/RemotePC/Disk1 then it is only listed under Bookmarks and the only way to differentiate it is using a different icon. Also there is no Remote section in pcmanfm.

Thanks for the links.

Problem Auto-Unmounting:
Okay, so I am supposed to use /mnt/RemotePC/Disk1 and it gets automatically mounted, but it is read-only and it gets unmounted after a couple of seconds - isn’t it possible to keep it mounted as long as the directory is open in the file browser?

Problem Read-only:
I could not find a solution in these threads.
If I access the mountpoint instead of using smb://… then the owner/group of the shared files is shown as “root”. If I access the share with smb://RemotePC/Disk1 and enter the correct remote user credentials, there is no user/group displayed in pcmanfm and I have read and write access like it is supposed to be.

“If your actual device is an existing device and the owner:group UID:GID do not match your device will be mounted read-only.” sounds like it could be the issue here, but since I am not supposed to use UID and GID and file_mode=0644,dir_mode=0755 should be correct, I don’t see how I could improve this.
The username for the remote share is specified in the credentials file that I added to the “Options” line in .mount - is that not enough?

In fstab there was the option users, but adding it to Options in .mount does not help.

I made no reference to pcmanfm with respect my previous comment.

I’ll show here the procedure that works for me:

  • Firstly, make sure the network location is available and reachable.

Go to: Remote → Network → Add Network Folder:

Select: Microsoft Windows network drive

Click Next

Complete required details; for example:

Name: A Little Ray of Sunshine
Server: remotepc
Folder: medialibrary

Create an icon for this remote folder

Click Save & Connect


If Samba is configured properly for your needs, the new network location will appear under Network. At this point, I typically drag and drop that under Remote to create a Places entry.

The name you chose for the connection (in the Add Network Folder dialog) differentiates it from other Places entries, though I might change the icon as well if I’m feeling particularly pedantic.

These entries do not mysteriously vanish.

Note: I have no entries in /etc/fstab - none are needed; neither is any local mountpoint. The target directory needs to be already shared and available on the remote computer.


If there is actually no misconfiguration … somewhere … preventing this procedure, then at this time I have little to suggest.

Regards.


If using Windows 8, the following is more appropriate:

client min protocol = SMB3

Using max limits to previous (possibly insecure) protocols;
Choosing min allows SMB_00 and upwards.

1 Like

The mountpoint is readonly - thus the data becomes readonly.

/mnt is a system path - and the permissions on the system path is inherited and in effect for your data provided by the share.

It is not recommended to use a system folder to mount your network locations - because you need to set correct permissions.

The article mention this and recommends to create a designated folder structure for your data. e.g.

sudo mkdir /data
sudo chown $USER:$USER /data
mkdir /data/<share1>
mkdir /data/<share2>

Then use those as mountpoints for your shares.

As for unmounting when idle - you can change the timeout in the automount unit

Another approach for mounting is using gio directly - gio is what gvfs provides and pcmanfm uses.

→ [root tip] [Utility Script] GIO mount samba share

One member used the above example to make this tiny GUI for samba shares

→ Need help for mounting smb share with Python - #4 by Golfy

2 Likes

Yes, that would make more sense. Unfortunately, it did not work:
Add Network Folder can’t connect to the share (somehow it ignores the server name and tries to use the folder name only for the smb:// command)
The manual approach with smb://remotepc/disk1 also becomes unusable after the change:
Dolphin: Internal Error Please send a full bug report at https://bugs.kde.org Unknown error condition: [38] Function not implemented
PCManFm: Error Failed to mount Windows share: Function not implemented

Checking the available smb versions on windows with Get-SmbServerConfiguration in the powershell only showed smb1 and 2 but since smb3 is bundled together with smb2 on windows, having no separate entry for smb3 is normal. So smb3 should be available and working.

client min protocol = SMB2 works and at least excludes the unsafe smb1.

But even after that, Add Network Folder does not work: Unable to connect to server. Please check your settings and try again. (no matter if I use the server IP or name).

Since it also said that that is just a convention and since I feel that having all mount points in one location keeps the system more maintainable, I would like to keep it that way.
There are no issues writing to the local disks mounted in /mnt - probably because of fmask and dmask settings in fstab that don’t seem to be available in .mount.

Also restricting filenames to windows_names seems to be possible only with fstab.

So to keep things simple for me I will keep using smb://…

Thanks for all the help!

Just to clarify -

@Anthony

The original topic was file transfers inside dolphin.

It was located to some kind of bug with the kio slave providing the access to a samba share.

For some reason it was requested reopened but the topic is no longer about speed but how to access.

Using fstab for network share mount is error prone and thus create other issues with accessing network shares.

Using mount/automount units eliminates this and makes accessing the shares as easy as access the defined mountpoint.

As you insist on using smb:// bookmarks and is thus getting other issues due to conflicting settings.

It is impossible to adapt a system to a user behavior where the behaviour itself is causing the issues.

Create bookmarks for your mountpoints - NOT your server’s share definitions - then your problems will go away.

If you don’t want to change your habits - then by all means continue as you see fit - but you will keep getting issues you don’t understand if you don’t change your habits.

1 Like

It was informational, and wasn’t meant to immediately solve anything. Naturally, to use that protocol it assumes that the Windows computer also has SMB3 configured.

Then, you would change it; it’s not complicated. Search for “Turn Windows features on or off” – scroll down and set the following:


Uncheck this item (turn off):

  • SMB 1.0/CIFS File Sharing Support

and check this item (turn on):

  • SMB Direct

Then, click OK and reboot.


From that point forward only SMB 3.x (and greater) protocols for filesharing will be supported. If Manjaro is also configured to use client min protocol = SMB3 in SMB.conf (as mentioned earlier) it will also use SMB 3.0 (and greater) protocols, and should just work.


SMB3 (and greater) are the most secure range of Samba protocols currently available, but both machines have to use it.

Again, this will only ensure a more secure connection, it won’t magically solve whatever issue is preventing it.

Regards.