Description of problem: When I use smbclient to connect to a share, I get the error: mkdir failed on directory /var/lib/samba/lock/msg.lock: Permission denied Unable to initialize messaging context Version-Release number of selected component (if applicable): samba-client-4.9.3-0.fc29.x86_64 How reproducible: Well, I guess I haven't run smbclient in a while, but it seems to happen all the time, now. I'm sure this didn't happen the last time I use smbclient.
I can confirm this is happening on my fedora 29 system. I've got this version of samba: samba-client-4.9.4-1.fc29.x86_64 This is also happening on my fedora 28 system when I try to connect to a share. samba-client-4.8.8-0.fc28.x86_64 I went to a fedora 27 system and this problem doesn't occur. samba-client-4.7.10-1.fc27.x86_64 How reproducible: It happens every single time you smbclient to connect to a share on f28 and f29
With 4.9.4 the message should be gone or different unless you have set a 'log level' in the config file.
Hm, I don't think so, as the toplevel directory (/var/lib/samba/lock/msg.lock) non-root creation attempt fails with a debug 0 statement.
Will be fixed with an update to a newer Samba version.
This still happens with samba-client-4.10.4-1.fc30.x86_64.
Cool, thanks for the update, Andreas.
Issue observed on samba-client-4.9.1-6.<distro>.x86_64 as well.
When running as non-root, do any of the following artifacts need to be replicated and restricted? $ man smb.conf | grep "/var/lib/samba" Default: binddns dir = /var/lib/samba/bind-dns Default: cache directory = /var/lib/samba Default: lock directory = /var/lib/samba/lock Default: ntp signd socket directory = /var/lib/samba/ntp_signd Default: private dir = /var/lib/samba/private Default: state directory = /var/lib/samba Default: smb passwd file = /var/lib/samba/private/smbpasswd
It happend to me also just now on Fedora 31 with samba-client-4.11.0-3.fc31.x86_64. My work around is: # smbclient -L <some server> Doing that as root creates a /var/lib/samba/lock/msg.lock after which the error message goes away.
Update to F31. I still see this, too. Ed's work around is interesting. It produces some other files, too, which I'm not sure should be left lying around. I don't get what these other files are for. gencache.tdb is world readable.
Seems like the group for files/directories under /var/lib/samba/ should perhaps be something like samba into which any authorized users could be added and thus be able to create/access files under /var/lib/samba/lock or /var/lib/samba/private. doing this manually eliminates this error message and allows msg.sock & msg.lock to be created (though they are created as the user running smbclient - which would then likely cause problems for another user). Not sure why smbclient is creating these files that are typically needed for the server. Probably just cause it's calling some common initialization library function that does that. Doesn't really seem like the right thing to do for a client-only application.
Is there still no official fix for this ?
Should be available in a few ours, see: https://bodhi.fedoraproject.org/updates/FEDORA-2020-5c3c93a400