ERROR: (ospd_openvas.lock) Could not create parent dir /var/run/gvm for lock file. [Errno 13] Permission denied: '/var/run/gvm'

I experienced scanning crashing after updating gvmd 21.4.3 to gvmd 21.4.5 on Rocky Linux release 8.6. Found in /var/log/gvm/ospd-scanner.log this error looping:

ERROR: (ospd_openvas.lock) Could not create parent dir /var/run/gvm for lock file. [Errno 13] Permission denied: ‘/var/run/gvm’

The error was caused by a wrong parameter in /usr/lib/systemd/system/ospd-openvas.service

So what I did to solve this was.

ln -s /usr/lib/systemd/system/ospd-openvas.service /etc/systemd/system/ospd-openvas.service
vi /etc/systemd/system/ospd-openvas.service

change:
ExecStart=/opt/atomicorp/bin/ospd-openvas --pid-file /var/run/ospd/ospd-openvas.pid --unix-socket=/var/run/ospd/ospd-openvas.sock --log-file /var/log/gvm/ospd-scanner.log --lock-file-dir /var/run/gvm/

to:
ExecStart=/opt/atomicorp/bin/ospd-openvas --pid-file /var/run/ospd/ospd-openvas.pid --unix-socket=/var/run/ospd/ospd-openvas.sock --log-file /var/log/gvm/ospd-scanner.log --lock-file-dir /var/run/gvmd/

save the file then run:
systemctl daemon-reload
systemctl restart ospd-openvas
systemctl restart gvmd
After this, scanning do run without errors.