Secure-Compliance-Solutions-LLC / GVM-Docker

Greenbone Vulnerability Management Docker Image with OpenVAS
https://securecompliance.gitbook.io/projects/
MIT License
247 stars 91 forks source link

Should "/firstsync" be "/data/firstsync" instead? #187

Closed grantemsley closed 3 years ago

grantemsley commented 3 years ago

The firstsync file is a flag to tell sync-all.sh to download the initial tar file from your server. Right now it downloads the tar file again even if you have existing data in the /data folder (symlinked to the appropriate /usr/local folders).

Works perfectly the first time, but if you change the container and restart it, this causes it to download the tar file then generate a bunch of errors shown below.

If the data has already been downloaded before getting the tar file shouldn't be needed. I think moving the flag file to /data would fix it, but I'm not 100% sure.

Downloading data TAR to speed up first sync...

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  1 65.1M    1  814k    0     0   913k      0  0:01:13 --:--:--  0:01:13  913k
  6 65.1M    6 4501k    0     0  2380k      0  0:00:28  0:00:01  0:00:27 2379k
 11 65.1M   11 7989k    0     0  2763k      0  0:00:24  0:00:02  0:00:22 2762k
 23 65.1M   23 15.5M    0     0  4097k      0  0:00:16  0:00:03  0:00:13 4097k
 34 65.1M   34 22.4M    0     0  4684k      0  0:00:14  0:00:04  0:00:10 4683k
 45 65.1M   45 29.3M    0     0  5095k      0  0:00:13  0:00:05  0:00:08 5840k
 52 65.1M   52 34.0M    0     0  5054k      0  0:00:13  0:00:06  0:00:07 6067k
 59 65.1M   59 39.0M    0     0  5066k      0  0:00:13  0:00:07  0:00:06 6397k
 68 65.1M   68 44.7M    0     0  5135k      0  0:00:12  0:00:08  0:00:04 5941k
 75 65.1M   75 49.2M    0     0  5090k      0  0:00:13  0:00:09  0:00:04 5488k
 82 65.1M   82 53.8M    0     0  5062k      0  0:00:13  0:00:10  0:00:03 5025k
 88 65.1M   88 57.5M    0     0  4957k      0  0:00:13  0:00:11  0:00:02 4824k
 99 65.1M   99 64.9M    0     0  5159k      0  0:00:12  0:00:12 --:--:-- 5304k
100 65.1M  100 65.1M    0     0  5057k      0  0:00:13  0:00:13 --:--:-- 4895k

Extracting data TAR...

mv: inter-device move failed: '/tmp/data/nvt-feed/2008' to '/usr/local/var/lib/openvas/plugins/2008'; unable to remove target: Directory not empty

mv: inter-device move failed: '/tmp/data/nvt-feed/2009' to '/usr/local/var/lib/openvas/plugins/2009'; unable to remove target: Directory not empty

mv: inter-device move failed: '/tmp/data/nvt-feed/2010' to '/usr/local/var/lib/openvas/plugins/2010'; unable to remove target: Directory not empty

mv: inter-device move failed: '/tmp/data/nvt-feed/2011' to '/usr/local/var/lib/openvas/plugins/2011'; unable to remove target: Directory not empty

mv: inter-device move failed: '/tmp/data/nvt-feed/2012' to '/usr/local/var/lib/openvas/plugins/2012'; unable to remove target: Directory not empty

mv: inter-device move failed: '/tmp/data/nvt-feed/2013' to '/usr/local/var/lib/openvas/plugins/2013'; unable to remove target: Directory not empty

mv: inter-device move failed: '/tmp/data/nvt-feed/2014' to '/usr/local/var/lib/openvas/plugins/2014'; unable to remove target: Directory not empty

mv: inter-device move failed: '/tmp/data/nvt-feed/2015' to '/usr/local/var/lib/openvas/plugins/2015'; unable to remove target: Directory not empty

mv: inter-device move failed: '/tmp/data/nvt-feed/2016' to '/usr/local/var/lib/openvas/plugins/2016'; unable to remove target: Directory not empty

mv: inter-device move failed: '/tmp/data/nvt-feed/2017' to '/usr/local/var/lib/openvas/plugins/2017'; unable to remove target: Directory not empty

mv: inter-device move failed: '/tmp/data/nvt-feed/2018' to '/usr/local/var/lib/openvas/plugins/2018'; unable to remove target: Directory not empty

mv: inter-device move failed: '/tmp/data/nvt-feed/2019' to '/usr/local/var/lib/openvas/plugins/2019'; unable to remove target: Directory not empty

mv: inter-device move failed: '/tmp/data/nvt-feed/2020' to '/usr/local/var/lib/openvas/plugins/2020'; unable to remove target: Directory not empty

mv: inter-device move failed: '/tmp/data/nvt-feed/2021' to '/usr/local/var/lib/openvas/plugins/2021'; unable to remove target: Directory not empty

mv: inter-device move failed: '/tmp/data/nvt-feed/GSHB' to '/usr/local/var/lib/openvas/plugins/GSHB'; unable to remove target: Directory not empty

mv: inter-device move failed: '/tmp/data/nvt-feed/ITG_Kompendium' to '/usr/local/var/lib/openvas/plugins/ITG_Kompendium'; unable to remove target: Directory not empty

mv: inter-device move failed: '/tmp/data/nvt-feed/Policy' to '/usr/local/var/lib/openvas/plugins/Policy'; unable to remove target: Directory not empty

mv: inter-device move failed: '/tmp/data/nvt-feed/attic' to '/usr/local/var/lib/openvas/plugins/attic'; unable to remove target: Directory not empty

mv: inter-device move failed: '/tmp/data/nvt-feed/gcf' to '/usr/local/var/lib/openvas/plugins/gcf'; unable to remove target: Directory not empty

mv: inter-device move failed: '/tmp/data/nvt-feed/pre2008' to '/usr/local/var/lib/openvas/plugins/pre2008'; unable to remove target: Directory not empty

mv: inter-device move failed: '/tmp/data/nvt-feed/report_formats' to '/usr/local/var/lib/openvas/plugins/report_formats'; unable to remove target: Directory not empty

mv: inter-device move failed: '/tmp/data/gvmd-data/20.08' to '/usr/local/var/lib/gvm/data-objects/20.08'; unable to remove target: Directory not empty

mv: inter-device move failed: '/tmp/data/gvmd-data/21.04' to '/usr/local/var/lib/gvm/data-objects/21.04'; unable to remove target: Directory not empty

mv: inter-device move failed: '/tmp/data/scap-data/oval' to '/usr/local/var/lib/gvm/scap-data/oval'; unable to remove target: Directory not empty

Updating NVTs...
Masaya-A commented 3 years ago

I've already created a PR as #179 for this a week ago...

austinsonger commented 3 years ago

The fixed as now been merged.