cnf db mode gets reset based on root umask each apt update

Bug #1951108 reported by Dan Streetman
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
command-not-found (Ubuntu)
Confirmed
Undecided
Kellen Renshaw

Bug Description

[impact]

each time 'apt update' is run, the cnf db is recreated, and it replaces the existing cnf db file. This resets its file mode based on the root umask, since root is the user that runs 'apt update'. If the root umask has the 'other' value set to 7 (e.g. umask 027), then the cnf db will not be readable by non-root users, which breaks usage of cnf.

[test case]

set root umask to (e.g.) 027 in /etc/login.defs and run 'sudo apt update', then check the mode of the cnf db (or try to use cnf as a non-root user)

[regression potential]

failure to create or update the cnf db, or problems with users using cnf

[scope]

this is needed upstream and in all releases

[other info]

https://salsa.debian.org/jak/command-not-found/-/merge_requests/5

Tags: sts
Dan Streetman (ddstreet)
tags: added: sts
Changed in command-not-found (Ubuntu):
assignee: nobody → Kellen Renshaw (krenshaw)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in command-not-found (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.