The Samba-Bugzilla – Bug 11566
net command emits spurious message when run by normal user.
Last modified: 2015-11-16 09:17:57 UTC
i cant use usershares. "net usershare info" always says "invalid ownership on directory /var/cache/samba/msg.lock"
drwxr-xr-x 2 root root 4096 21. Okt 17:48 msg.lock
im in group sambashare and directory /var/lib/samba/usershare is set up:
drwxrwx--T 2 root sambashare 4096 21. Okt 17:23 usershares
server string = Samba Server
security = USER
log file = /var/log/samba/%m.log
max log size = 50
dns proxy = No
usershare allow guests = Yes
usershare max shares = 100
usershare owner only = No
idmap config * : backend = tdb
Turns out this is an invalid error message when being invoked from the 'net' command.
The code path that emits this message is source3/utils/net.c:main()
* Failing to init the msg_ctx isn't a fatal error. Only root-level
* things (joining/leaving domains etc.) will be denied.
c->msg_ctx = messaging_init(c, samba_tevent_context_init(c));
which ends up inside directory_create_or_exist_strict() which is checking /var/cache/samba/msg.lock which is printing the message at debug zero if the uid's don't match.
I think that debug level should be raised, as messaging_init() is often called by non-root code.
The local usershares should still work though.
Created attachment 11557 [details]
git-am fix for 4.3.next.
Cherry-picked from master.
Created attachment 11558 [details]
git-am fix for 4.2.next.
Back-ported from master.
Re-assigning to Karolin for inclusion in 4.3.next, 4.2.next.
it may be that usershares by command line still work. but i think that this message prevents creating shares with dolphin file manager from working.
Thanks for the update - the bug fix is scheduled to go into the next release anyway so you should be good to go.
(In reply to Jeremy Allison from comment #4)
Pushed to autobuild-v4-[2|3]-test.
(In reply to Karolin Seeger from comment #7)
Pushed to both branches.
Closing out bug report.