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

If cachedir can't be created there are no data in DBs #11

Closed
jirib opened this issue Jul 14, 2020 · 1 comment
Closed

If cachedir can't be created there are no data in DBs #11

jirib opened this issue Jul 14, 2020 · 1 comment

Comments

@jirib
Copy link

jirib commented Jul 14, 2020

IIUC if cachedir can't be created there are no data in DBs.

# docker inspect 82d740cc0095 | jq -r '.[] | .RepoDigests'
[
  "vuls/go-msfdb@sha256:a0cc1b90e1d3b500b6d9127fb8e5d0b9ffe33da2bc7bdb410c853107ecb53814"
]
t=2020-07-14T12:36:43+0000 lvl=info msg="Opening DB" db=sqlite3
t=2020-07-14T12:36:43+0000 lvl=info msg="Init DB" db=sqlite3
t=2020-07-14T12:36:43+0000 lvl=info msg="Migrating DB" db=sqlite3
t=2020-07-14T12:36:43+0000 lvl=info msg="Fetching vulsio/msfdb-list"
t=2020-07-14T12:36:43+0000 lvl=info msg="git clone" repo=/.cache/go-msfdb/msfdb-list
t=2020-07-14T12:36:43+0000 lvl=eror msg="Failed to fetch vulsio/msfdb-list" err="mkdir /.cache: permission denied"
sqlite> .tables
edbs         metasploits  msf_edbs     msf_refs     references 
sqlite> .schema metasploits;
sqlite> 
sqlite> .schema mtasploits
sqlite> select * from metasploits;
sqlite> .quit

I solved it this way:

--mount type=tmpfs,destination=/cache,tmpfs-mode=1777 -e XDG_CACHE_HOME=/cache -u <myuser>:<myuser>
# sqlite3 /data/vuls/data/go-msfdb.sqlite3 '.schema metasploits'
CREATE TABLE "metasploits" ("id" integer primary key autoincrement,"created_at" datetime,"updated_at" datetime,"deleted_at" datetime,"name" varchar(255),"title" varchar(255),"description" varchar(255),"cve_id" varchar(255) );
CREATE INDEX idx_metasploits_deleted_at ON "metasploits"(deleted_at) ;
CREATE INDEX idx_metasploit_cve_id ON "metasploits"(cve_id) ;
@shino
Copy link
Contributor

shino commented Sep 24, 2024

This issue was closed because it has been inactive.

@shino shino closed this as completed Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants