--- old/CommandNotFound/db/creator.py 2018-03-20 11:31:18 +0000 +++ new/CommandNotFound/db/creator.py 2020-10-16 09:23:46 +0000 @@ -7,6 +7,7 @@ import sqlite3 import sys import time +import stat import apt_pkg apt_pkg.init() @@ -95,6 +96,9 @@ rm_f(metadata_file) # put database in place os.rename(tmpdb, dbname) + # change mode to 644 + mode = stat.S_IREAD | stat.S_IWRITE | stat.S_IRGRP | stat.S_IROTH + os.chmod(dbname, mode) # add new metadata with open(metadata_file, "w") as fp: json.dump(self._calc_input_metadata(), fp)