Hello everyone,
I’ve been using the OpenVas scanner for my undergraduate research for a month or so now, I’m using the API offered to create scripts in python via gmp that allow me to create targets, create tasks, run scans, and take the results returned from the scan report and everything seems to be working properly.
Only now I notice that when I start the rest server with the command “sudo gvm-start” the following error occurs:
Sep 13 10:23:21 kali systemd[1]: Starting gvmd.service - Greenbone Vulnerability Manager daemon (gvmd)...
Sep 13 10:23:21 kali systemd[1]: gvmd.service: Can't open PID file /run/gvmd/gvmd.pid (yet?) after start: Operation not permitted
Sep 13 10:23:23 kali systemd[1]: Started gvmd.service - Greenbone Vulnerability Manager daemon (gvmd).
since I am not very experienced I will put you below the entire answer that appears in the terminal along with the error.
sudo gvm-start
[>] Please wait for the GVM services to start.
[>]
[>] You might need to refresh your browser once it opens.
[>]
[>] Web UI (Greenbone Security Assistant): https://127.0.0.1:9392
● gsad.service - Greenbone Security Assistant daemon (gsad)
Loaded: loaded (/lib/systemd/system/gsad.service; disabled; preset: disabled)
Active: active (running) since Wed 2023-09-13 10:23:28 EDT; 20ms ago
Docs: man:gsad(8)
https://www.greenbone.net
Main PID: 17413 (gsad)
Tasks: 1 (limit: 6855)
Memory: 912.0K
CPU: 6ms
CGroup: /system.slice/gsad.service
└─17413 /usr/sbin/gsad --foreground --listen 127.0.0.1 --port 9392
Sep 13 10:23:28 kali systemd[1]: Starting gsad.service - Greenbone Security Assistant daemon (gsad)...
Sep 13 10:23:28 kali systemd[1]: Started gsad.service - Greenbone Security Assistant daemon (gsad).
● gvmd.service - Greenbone Vulnerability Manager daemon (gvmd)
Loaded: loaded (/lib/systemd/system/gvmd.service; disabled; preset: disabled)
Active: active (running) since Wed 2023-09-13 10:23:23 EDT; 5s ago
Docs: man:gvmd(8)
Process: 17354 ExecStart=/usr/sbin/gvmd --osp-vt-update=/run/ospd/ospd.sock --listen-group=_gvm (code=exited, status=0/SUCCESS)
Main PID: 17355 (gvmd)
Tasks: 1 (limit: 6855)
Memory: 177.8M
CPU: 953ms
CGroup: /system.slice/gvmd.service
└─17355 "gvmd: gvmd: Wa" --osp-vt-update=/run/ospd/ospd.sock --listen-group=_gvm
Sep 13 10:23:21 kali systemd[1]: Starting gvmd.service - Greenbone Vulnerability Manager daemon (gvmd)...
Sep 13 10:23:21 kali systemd[1]: gvmd.service: Can't open PID file /run/gvmd/gvmd.pid (yet?) after start: Operation not permitted
Sep 13 10:23:23 kali systemd[1]: Started gvmd.service - Greenbone Vulnerability Manager daemon (gvmd).
● ospd-openvas.service - OSPd Wrapper for the OpenVAS Scanner (ospd-openvas)
Loaded: loaded (/lib/systemd/system/ospd-openvas.service; disabled; preset: disabled)
Active: active (running) since Wed 2023-09-13 10:23:21 EDT; 7s ago
Docs: man:ospd-openvas(8)
man:openvas(8)
Process: 17336 ExecStart=/usr/bin/ospd-openvas --config /etc/gvm/ospd-openvas.conf --log-config /etc/gvm/ospd-logging.conf (code=exited, status=0/SUCCESS)
Main PID: 17342 (ospd-openvas)
Tasks: 5 (limit: 6855)
Memory: 46.2M
CPU: 888ms
CGroup: /system.slice/ospd-openvas.service
├─17342 /usr/bin/python3 /usr/bin/ospd-openvas --config /etc/gvm/ospd-openvas.conf --log-config /etc/gvm/ospd-logging.conf
└─17345 /usr/bin/python3 /usr/bin/ospd-openvas --config /etc/gvm/ospd-openvas.conf --log-config /etc/gvm/ospd-logging.conf
Sep 13 10:23:20 kali systemd[1]: Starting ospd-openvas.service - OSPd Wrapper for the OpenVAS Scanner (ospd-openvas)...
Sep 13 10:23:21 kali systemd[1]: Started ospd-openvas.service - OSPd Wrapper for the OpenVAS Scanner (ospd-openvas).
[>] Opening Web UI (https://127.0.0.1:9392) in: 5... 4... 3... 2... 1...
The questions I ask are:
- Is there any way to solve this problem?
- Are the rest of the answers the terminal gives me correct or is there some other problem?
- What causes this problem to be present since the way I use it, everything seems to be working?
- Bonus question: when I run scripts where I use gmp, I necessarily have to use root privileges “sudo python3 file.py” to run them, is there any way to avoid using root privileges to run the file?