Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pathing has been changed in gvm-libs #9

Closed
romelBen opened this issue Aug 6, 2021 · 10 comments · Fixed by #10
Closed

Pathing has been changed in gvm-libs #9

romelBen opened this issue Aug 6, 2021 · 10 comments · Fixed by #10
Labels
bug Something isn't working resolved

Comments

@romelBen
Copy link

romelBen commented Aug 6, 2021

Hey @Jarthianur ,

Just wanted to drop in and say your code is great. I has helped me bootstrap myself in what I needed for myself and I want to help out if an issue occurs. Recently GVM released a push of PATHing that was changed. When running the script it fails for me saying /run/gvm Permission denied.

Here is the link: greenbone/gvm-libs#574.

Let me know what happens. I am currently fixing the issue on my side.

@Jarthianur
Copy link
Owner

Thanks for reporting this. I'm investigating...

@Jarthianur
Copy link
Owner

It seems like these recent changes have broken a few things...

@Jarthianur Jarthianur reopened this Aug 19, 2021
@romelBen
Copy link
Author

I would add this into gvmd and openvas systemd service @Jarthianur.

RuntimeDirectory=gvm
RuntimeDirectoryMode=0750
PermissionsStartOnly=True

This will run directories of gvm and ospd in /run. Hope this helps out.

@Jarthianur
Copy link
Owner

Thanks for this hint. I've tried the directory entry already with at least some success. But currently facing the issue that there is no scanner created anymore upon installation- or at least gvmd cannot communicate to it.

@romelBen
Copy link
Author

What are the errors you are receiving in your logs @Jarthianur? For example, in /var/log/gvm/?

@romelBen
Copy link
Author

When I run gvm-cli like so: gvm-cli --gmp-username admin --gmp-password admin socket --socketpath /run/gvm/gvmd.sock --xml "<get_tasks/>"

It's able to get a status 200 response. Would like to help.

@Jarthianur
Copy link
Owner

Honestly I do not know what exactly has gone wrong. I have pushed a few changes based on the official greenbone service config. Could you please confirm that it's working for you.

@romelBen
Copy link
Author

So it is giving an error on the changes with Greenbone's documentation. (I tried the same thing and was not playing nice with me.) For my build, I ironed out some of the pathing and added RuntimeDirectoryMode into my systemd settings for gvmd and openvas since my script will be run at bootup. My script is here: https://github.com/romelBen/gvm_bash_script. Check it out. It draws a lot of inspiration from your code. I cut the systemd services of running the updates for SCAP, GVMD, NVTS, etc and gsa, where I use gvm-cli instead for doing the scans. But what I could find is the pathing in openvas and gvmd can be a big tricky if you follow Greenbone's documentation on installation.

Let me know if you can get it to work. Would like to help out as much as I can.

@Jarthianur
Copy link
Owner

I've tested the current state of master multiple times now - works good.
What exact errors are you facing?

@romelBen
Copy link
Author

Let me recreate the build and see if it will build correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resolved
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants