File watchman@.socket of Package watchman
[Unit] Description=Watchman socket for user %i [Socket] ListenStream=/run/watchman/%i-state/sock Accept=false SocketMode=0640 SocketUser=%i SocketGroup=users # the mode for the implicitly created, intermediate %i-state directory DirectoryMode=0750 # this explicitly sets the ownership of the user's state directory # there seems to be no built-in way to achieve this via systemd options # this needs to be post-start, because otherwise the directory is not yet # created by systemd ExecStartPost=/usr/bin/chown %i:users /run/watchman/%i-state [Install] WantedBy=sockets.target