Hello,
I am having problems starting the gvmd daemon with systemd. Here is the content of my service script.
[Unit]
Description=Greenbone OpenVAS Manager
After=network.target networking.service postgresql.service ospd-openvas.service
Wants=postgresql.service ospd-openvas.service
ConditionKernelCommandLine=!recovery
[Service]
Type=forking
User=gvm
Group=gvm
RuntimeDirectory=gvm
RuntimeDirectoryMode=2775
PIDFile=/var/run/gvm/gvmd.pid
ExecStart=/usr/sbin/gvmd --osp-vt-update=/run/ospd/ospd.sock
Restart=always
TimeoutStopSec=10
[Install]
WantedBy=multi-user.target
Here the content of the gvmd.log file:
md manage:MESSAGE:2021-09-26 22h06.22 utc:3215472: No CERT database found
libgvm util:MESSAGE:2021-09-26 22h06.23 utc:3215472: Setting GnuPG dir to ‘/var/lib/gvm/gvmd/gnupg’
libgvm util:MESSAGE:2021-09-26 22h06.23 utc:3215472: Using OpenPGP engine version ‘2.2.20’
libgvm base:CRITICAL:2021-09-26 22h06.23 utc:3215472: pidfile_create: failed to open pidfile: Permission denied
md main:MESSAGE:2021-09-26 22h07.53 utc:3215578: Greenbone Vulnerability Manager version 21.4.2 (DB revision 242)
md manage:MESSAGE:2021-09-26 22h07.53 utc:3215579: No SCAP database found
md manage:MESSAGE:2021-09-26 22h07.53 utc:3215579: No CERT database found
libgvm util:MESSAGE:2021-09-26 22h07.53 utc:3215579: Setting GnuPG dir to ‘/var/lib/gvm/gvmd/gnupg’
libgvm util:MESSAGE:2021-09-26 22h07.53 utc:3215579: Using OpenPGP engine version ‘2.2.20’
libgvm base:CRITICAL:2021-09-26 22h07.53 utc:3215579: pidfile_create: failed to open pidfile: Permission denied
So with the limited amount of log message I have, I guess the problem is that gvmd cannot create its pid file under /run/gvm/. Anyone have an idea, maybe I’m missing something to add in gvmd.service?
stat /run/gvm
File: /run/gvm
Size: 140 Blocks: 0 IO Block: 4096 directory
Device: 17h/23d Inode: 43099555 Links: 2
Access: (2775/drwxrwsr-x) Uid: ( 995/ gvm) Gid: ( 992/ gvm)
Access: 2021-09-26 18:23:08.397636924 -0400
Modify: 2021-09-26 18:22:57.459121467 -0400
Change: 2021-09-26 18:22:57.459121467 -0400
Birth: -
GVM versions
gsad: 21.4.2
gvmd: 21.4.2
openvas-scanner: 21.4.2
gvm-libs: 21.4.2
Environment
Operating system: AlmaLinux8.4
Kernel: 4.18.0-305.12.1.el8_4.x86_64
Installation method / source: source