samba SMB share certain operations fail
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
samba (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Samba SMB shares accessed from Windows or Mac OS don't work as expected when using tools like Git or npm (node package manager).
Expected: For example, Git clones to a folder mounted via SMB, as it did with previous ubuntu versions
What happened:
When using git clone in an smb mounted directory, git throws the following errors:
warning: unable to unlink 'images': Directory not empty
fatal: cannot create directory at 'images': Directory not empty
The errors vary a bit every run (stops at different files/dirs) when extracting or doing other operations. Copying and writing from files via the file browser works without a problem.
I could reproduce the error in the following environment with the latest updates applied:
Ubuntu 20.04.1 LTS (Ubuntu 5.4.0-51.56-generic 5.4.65)
Ubuntu 20.04.1 LTS (Ubuntu 5.4.0-48.52-generic 5.4.60)
Samba version 4.11.6-Ubuntu
Clients: Windows 10 Version 10.0.18363 Build 18363, Mac OS 10.13.6
On a fresh install with Ubuntu 18.04 (Samba 4.7.6) and CentOS 7 (Samba 4.11) as SMB servers the error does NOT occur, with the same standard smb.conf.
Also, setting the following options in smb.conf did NOT help:
mangled names = Yes
oplocks = False
level2 oplocks = False
I will happily provide any information/testing that is necessary.
Thank you
Can you clarify one scenario that reproduces the problem, being explicit about what the server is, and the client? cifs-utils (and the kernel?) could very well be involved here. Also the server share config please. Or can you show the bad/good behavior by just by switching servers, and keeping the same client?
It also may matter which SMB protocol was used for the mount, as defaults have changed. To be honest, I'm suspecting it's unix extensions that are not being used, since the default cifs mount option changed from SMB1 (deprecated nowadays) to SMB2 and higher, and unix extensions are not yet available for these higher protocol versions.
To see which version was selected, you can type "mount -t cifs" or check dmesg right after a mount was done.