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

Permission Denied When Running gvm-cli #291

Closed
1N3 opened this issue Sep 15, 2020 · 4 comments
Closed

Permission Denied When Running gvm-cli #291

1N3 opened this issue Sep 15, 2020 · 4 comments
Labels
invalid This doesn't seem right

Comments

@1N3
Copy link

1N3 commented Sep 15, 2020

Getting permission denied error when trying to run a simple <get_version/> command via gvm-cli. Any ideas?

GVM versions

kali@kali:$ gvm-cli --version
gvm-cli 2.0.0 (API version 1.2.0)
kali@kali:
$ dpkg -l | grep gvm
ii gvm 11.0.2+kali3 all remote network security auditor - metapackage and useful scripts
ii gvm-tools 2.0.0-0kali1 all Remote control the Greenbone Vulnerability Manager
ii gvmd 9.0.1-2kali1 amd64 Manager Module of Greenbone Vulnerability Manager
ii gvmd-common 9.0.1-2kali1 all architecture independent files for Greenbone Vulnerability Manager
ii libgvm11:amd64 11.0.1-1 amd64 remote network security auditor - shared libraries
ii python3-gvm 1.2.0-0kali2 all Greenbone Vulnerability Management Python Library (Python 3)

Environment

Operating system:
Kali 2020.3
Installation method / source: (packages)

Logfiles

kali@kali:~$ gvm-cli socket --xml "<get_version/>"
Traceback (most recent call last):
  File "/usr/bin/gvm-cli", line 11, in <module>
    load_entry_point('gvm-tools==2.0.0', 'console_scripts', 'gvm-cli')()
  File "/usr/lib/python3/dist-packages/gvmtools/cli.py", line 127, in main
    with protocol_class(connection, transform=transform) as protocol:
  File "/usr/lib/python3/dist-packages/gvm/protocols/gmp.py", line 117, in __enter__
    gmp = self.determine_supported_gmp()
  File "/usr/lib/python3/dist-packages/gvm/protocols/gmp.py", line 100, in determine_supported_gmp
    version = self.determine_remote_gmp_version()
  File "/usr/lib/python3/dist-packages/gvm/protocols/gmp.py", line 83, in determine_remote_gmp_version
    self.connect()
  File "/usr/lib/python3/dist-packages/gvm/protocols/base.py", line 107, in connect
    self._connection.connect()
  File "/usr/lib/python3/dist-packages/gvm/connections.py", line 351, in connect
    self._socket.connect(self.path)
PermissionError: [Errno 13] Permission denied
@y0urself
Copy link
Member

This is a permission problem of your files. Probably of that socket file you are using, not a problem in the gvm-tools.
You might adjust the permissions of that socket file you are using ... probably at the default path /var/run/gvmd.sock?

@bjoernricks
Copy link
Member

This is not a permission error on gvmd side. As @y0urself already mentioned you don't have file system permissions to access the used unix domain socket. Therefore closing here.

@bjoernricks bjoernricks added the invalid This doesn't seem right label Sep 16, 2020
@ghost
Copy link

ghost commented May 24, 2022

run the following command 👍
sudo chmod 662 /var/run/gvmd/gvmd.sock

@darksider01011
Copy link

run the following command 👍 sudo chmod 662 /var/run/gvmd/gvmd.sock

Thank you for help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

4 participants