Hello guys, while trying to build from the source in ubuntu 22.04 using the following link: https://greenbone.github.io/docs/latest/22.4/source-build/index.html , I get an error while downloading the openvas scanner sources with the following commands: curl -f -L https://github.com/greenbone/openvas-scanner/archive/refs/tags/v$OPENVAS_SCANNER_VERSION.tar.gz -o $SOURCE_DIR/openvas-scanner-$OPENVAS_SCANNER_VERSION.tar.gz
curl -f -L https://github.com/greenbone/openvas-scanner/releases/download/v$OPENVAS_SCANNER_VERSION/openvas-scanner-$OPENVAS_SCANNER_VERSION.tar.gz.asc -o $SOURCE_DIR/openvas-scanner-$OPENVAS_SCANNER_VERSION.tar.gz.asc
But I get a 404 from the requested URL. Could anyone please tell if the source URL has changed for the source? please let me know. I am in the process of the installation. Thank you in advance for the help.
hi, it is very very likely that the OPENVAS_SCANNER_VERSION variable is not set.
Hello bricks. Thank you so much for the quick response. That was the case actually. Somehow I missed to set that variable. It works now and I am continuing with the rest of the steps. Thanks a lot for helping me out.
@bricks I could perform all the steps . But when I start to run the services for example starting with notus-scaner. It fails with an error code. When I see the journalctl logs it says failed to execute permission denied. Could you please tell why this is happening? I think I followed the steps correctly. Thanks a lot again for the help. I really appreciate it.
Hi,
could you check the permissions by running ls -la /usr/local/bin/notus-scanner
?
@bricks Hello Bricks. First of all thank you for your continuous support in this community. Could you also please help me solve this situation? I really not able to understand the problem that I have. Kindly, please help me out to install this in my ubuntu. I am attaching my ubuntu version.
How to debug a permission error when running in a service?
First of all take a look at the permissions to check if user can execute the binary/script. We already have done that. Looks good to me: read and execute permissions are set for the user (root), group (root) and others.
Next, try to run the service without systemd for the desired user:
sudo -u gvm /usr/local/bin/notus-scanner --foreground --products-directory /var/lib/notus/products --log-file /var/log/gvm/notus-scanner.log
If that works fine, we have some systemd related issue. If not, we hopefully get more info about the real cause of the issue.
Can you test if you are able to run
/usr/local/bin/notus-scanner --foreground --products-directory /var/lib/notus/products
as root user?
Could you try if
sudo -u gvm mkdir -p /run/notus-scanner && python /usr/local/bin/notus-scanner --foreground --products-directory /var/lib/notus/products --log-file /var/log/gvm/notus-scanner.log
works? It seems the installation of notus-scanner in the docs is still a bit defect.
Ah sorry should be
mkdir -p /run/notus-scanner && sudo -u gvm python3 /usr/local/bin/notus-scanner --foreground --products-directory /var/lib/notus/products --log-file /var/log/gvm/notus-scanner.log
Ok next try
mkdir -p /run/notus-scanner && chown gvm.gvm /run/notus-scanner && sudo -u gvm python3 /usr/local/bin/notus-scanner --foreground --products-directory /var/lib/notus/products --log-file /var/log/gvm/notus-scanner.log
At the end it should be fixed with https://github.com/greenbone/docs/pull/282
@bricks thanks a lot for trying to solve this with me. I really appreciate it. I run the above and got the following now:
Hi,
the mentioned PR is merged and it’s now available in the latest docs. I’ve changed the installation of notus-scanner
, ospd-openvas
, greenbone-feed-sync
and gvm-tools
(again) and this should fix your permissions issues.
The last issue you have uploaded is caused by not having synced the VT feed yet.
@bricks Hello, I wan to really appreciate and thank you for making all the required changes in the documentation. The services are all up right now. Just one last help on this topic from your end. Somehow the GUI is not up yet. Could you please tell me where I can configure the ip address as I have installed this on a linux cloud instance and want to access it in the browser with its public accessible ip. Also I found a error if it has anything to do with this, so I am also attaching the screenshot