12.09.2023 11:40, Andrew Bartlett via samba:> On Tue, 2023-09-12 at 11:07 +0300, Michael Tokarev wrote:
>> Generally, samba does place its files a bit arbitrary and
>> unthinkfully.For example, in debian I have a patch which move socket
>> directory (whichis definitely a runtime thing, with sockets to
>> communicate with runningprocesses) to lock directory instead of
>> having them in /var/lib/samba/ (!!)where they don't fit at all.
>
> The main reason that at least some of the sockets are under
> /var/lib/samba is that the socket permisisons are long-term state, even
> if the listeners are ephemeral.
Um.
# ll -a /run/samba/msg.sock/
total 0
drwx------ 2 root root 480 Sep 12 11:43 ./
drwxr-xr-x 7 root root 480 Sep 12 02:50 ../
srwxrwxrwx 1 root root 0 Sep 10 12:28 106srwxrwxrwx 1 root root 0 Sep 10
12:28 107srwxrwxrwx 1 root root 0 Sep 10 12:28 136srwxrwxrwx 1 root root 0
Sep 10 12:28 208srwxrwxrwx 1 root root 0 Sep 10 12:28 212srwxrwxrwx 1 root
root 0 Sep 10 12:28 213srwxrwxrwx 1 root root 0 Sep 10 13:55 2173srwxrwxrwx
1 root root 0 Sep 11 06:14 25036srwxrwxrwx 1 root root 0 Sep 11 06:38
25632srwxrwxrwx 1 root root 0 Sep 11 06:43 25766srwxrwxrwx 1 root root 0 Sep
11 06:43 25771srwxrwxrwx 1 root root 0 Sep 11 06:43 25781srwxrwxrwx 1 root
root 0 Sep 11 06:43 25795srwxrwxrwx 1 root root 0 Sep 11 06:43 25799
These are 100% runtime things and definitely have no long-term
state at all. Each socket is named after a process pid, and
the sockets are used by smbcontrol to communicate with running
samba processes.
I'm not talking about
srwxrwxrwx 1 root root 0 Sep 10 12:28 /var/lib/samba/winbindd_privileged/pipe
for example, or ntp socket, or something like that - these, which
are used by other subsystems, are kept at the same location in
debian.
I'm talking about the 100% transient runtime thing.
msg.sock is not a place for private directory in /var/lib/samba.
/mjt