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.

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

1 Like