On 5/16/2022 3:06 PM, Marco d'Itri wrote:
On May 16, Richard Landster <deb...@lewenberg.com> wrote:

May 13 15:28:34 usenet-dev.stanford.edu systemd[3284]: inn2.service: Failed to 
set up special execution directory in /var/lib: Not a directory
May 13 15:28:34 usenet-dev.stanford.edu systemd[3284]: inn2.service: Failed at 
step STATE_DIRECTORY spawning /usr/lib/news/bin/rc.news: Not a directory
I think that there is something unusual in your system: how do /var/
and /var/lib/ look like?

usenet-dev:/etc/news# ls -lrtd /var
drwxr-xr-x 12 root root 4096 May 13 13:34 /var
usenet-dev:/etc/news# ls -lrtd /var/lib
drwxr-xr-x 25 root root 4096 May 13 15:28 /var/lib
usenet-dev:/etc/news# ls -lrtd /var/lib/news
lrwxrwxrwx 1 root root 18 May 13 13:19 /var/lib/news -> /var/spool/news/db

usenet-dev:/etc/news# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            3.9G     0  3.9G   0% /dev
tmpfs           796M  1.5M  795M   1% /run
/dev/sda1        15G  2.5G   12G  18% /
tmpfs           3.9G     0  3.9G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
/dev/sda3      1007M  2.0M  954M   1% /var/cache/openafs
AFS             2.0T     0  2.0T   0% /afs
/dev/sdb1       196G   77G  110G  42% /var/spool/news



Starting the service with /etc/init.d/inn2 does _not_ result in an error.
I do not understand this, because the init script sources
/lib/lsb/init-functions which sources
/lib/lsb/init-functions.d/40-systemd which makes it just run systemctl
anyway.


You are correct, of course. I made a copy of /etc/init.d/inn2 called /etc/init.d/inn2-custom and ran that without the error the systemd version gave me. Sorry for the confusion.

In any event I have found the issue. As you can see from the above /var/lib/news is a symbolic link. In the service file StateDirectory is set to news which resolves to /var/lib/news. It seems that systemd does not like StateDirectory to be a symbolic link. Lesson learned.

Please close this issue.

Reply via email to