Permission denied on recent GVM 21.04 change

I am running into issues from yesterday when I build GVM using 21.04. Specifically, I am running into installation issues in gvm-libs. I have not changed my script and it worked before. I believe the PATHing was changed and I need to update it to get a newly built GVM up and running. Here is the error that I see:

Install the project...
-- Install configuration: "Debug"
CMake Error at base/cmake_install.cmake:49 (file):
-- Installing: /run/gvm
file INSTALL cannot make directory "/run/gvm": Permission denied.
Call Stack (most recent call first):
cmake_install.cmake:42 (include)
make: *** [Makefile:108: install] Error 1

Since the error is saying Permission denied, I know it would have to be with my pathing. Here is my code:

export GVM_INSTALL_PREFIX=/opt/gvm

export PKG_CONFIG_PATH="$GVM_INSTALL_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH"

With my function:

function install_gvm_libs() {
  set -e
  export PKG_CONFIG_PATH="$PKG_CONFIG_PATH"
  cd ~/src/gvm-libs
  mkdir -p build
  cd build
  rm -rf *
  cmake -DCMAKE_INSTALL_PREFIX="$GVM_INSTALL_PREFIX" ..
  make -j
  make doc
  make install
}

Could I be told as to what PATHs were recently changed in GVM? Would appreciate any help!

Hi @roma,

two days ago we had this PR merged to gvm-libs:


Maybe this can help you.

Have a nice weekend

1 Like

Oooo, this helps! Let me update this on my side for pathing, and get back to you on what happened.

When I put the pathing for my installation, I still receive errors of Permission denied such as -DGVM_PID_DIR="$GVM_INSTALL_PREFIX". Am I not doing something right when the recent change occurred? Thanks.

Same problem here also. It seems GVM_INSTALL_PREFIX variable is completely ignored at compile time. Before that patch, the variable was successfully used by cmake, and the installation root dir was changed accordingly. With the new patch, it looks like cmake is overriding this variable to the new defaults in this patch.

Looking at the patch itself; this is expected to happens when the variables SYSCONFDIR,LOCALSTATEDIR, GVM_RUN_DIR and GVM_PID_DIR are unset.

If unset, they are by default set to the new defaults but without the GVM_INSTALL_PREFIX path first.

This looks aberrant to me. Unless there is a reason I’m not seeing ?

So only way to get around this is to manually set SYSCONFDIR,LOCALSTATEDIR, GVM_RUN_DIR and GVM_PID_DIR to whatever your install path is.

I’ve explained the reason behind this change in the gvm-libs PR too.

We just switched the default installation for state and config files. For a normal system wide user installation the old way of including the prefix in all paths just doesn’t make sense. It is only useful for a developer setup. For example the /run dir is very special with systemd and using PREFIX/run will not give you the same behavior of the system.

This is the list of PR changing the installation paths:





1 Like

I am stuck with this error:

CMake Error at base/cmake_install.cmake:49 (file):
  file INSTALL cannot make directory "/run/gvm": Permission denied.

Can you give me a clear step to fix it?. I am a bit confused looking at those GitHub URLs which are posted by @bricks

Please follow the instructions at https://greenbone.github.io/docs/

2 Likes

Thank you @bricks. Everything works fine now.

Do you have documentation on how to properly scan a host ?.

For a usage guide you can take a look at our GSM manual. Most things from the chapter https://docs.greenbone.net/GSM-Manual/gos-21.04/en/web-interface.html should be valid for the open source version too (our product has only very little changes regarding the web interface and scanning).

2 Likes