I am not able to delete or change files and folders on a samba share (Fritz-NAS share, mounted via fstab) neither with Dolphin nor with the KDE terminal (Konsole). Without KDE, on the shell (FreeBSD 12.1-RELEASE), it is working as well as with my smart phone. The problem is exactly reproduceable on another machine.
I also checked it out with XFCE and had no problems.
"mounted via fstab" isn't very clear. You mean, mounted via mount_smbfs?
(In reply to Gleb Popov from comment #1)
Yes, I do. This is the entry in /etc/fstab:
//email@example.com/fritz.nas /mnt/nas-hdd smbfs rw,-I=192.168.178.1 0 0
Owner group and access rights are set properly and out of KDE-Plasma on the shell (wether as root or as a normal user) there are no problems.
However, after closing Dolphin, the file can be successfully deleted from Konsole.
I think, the problem is because our implementation of QFileSystemWatcher calls open() on files being watched. In case of SMBFS this probably locks them and prevents deletion.
Not sure how to fix this, though. Make Qt see what is the type underlying filesystem is?
The problem goes down to devel/libinotify.
Pull request pending upstream: https://github.com/libinotify-kqueue/libinotify-kqueue/pull/8
@sunpoet, can I adjust devel/libinotify so that it pass --enable-skip-subfiles=smbfs during configure step?
See this PR and https://github.com/libinotify-kqueue/libinotify-kqueue/pull/8 fir rationale.
(In reply to Gleb Popov from comment #5)
I'm OK for this change. Will it affect other ports?
(In reply to Sunpoet Po-Chuan Hsieh from comment #6)
Of course it would. Pretty much every Qt port, at least.
A commit references this bug:
Date: Fri Apr 24 08:33:17 UTC 2020
New revision: 532745
devel/libinotify: Do not set watches on smbfs and fusefs filesystems.
Approved by: sunpoet
Should be fixed with libinotify-20180201_2