From 0a583556e460311a7767dad30e49b5232655f069 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Fri, 15 Mar 2019 10:19:39 +0000 Subject: data: fix owner & permissions on existing state files If colord was previously configured to run as root, and subsequently made to run as a different user, it will be unable to write to its state files: colord[668]: CdDevice: failed to save mapping to database: SQL error: attempt to write a readonly database 'd' creates a directory if missing, and fixes its permissions if it already exists, but it is not recursive. 'Z' recursively adjusts the permission of the given directory and its children, but only if it already exists. Together, these rules ensure that @localstatedir@/lib/colord and @localstatedir@/lib/colord/icc both exist, and that @localstatedir@/lib/colord and all its descendents are owned by the correct user. --- data/colord.conf.in | 1 + 1 file changed, 1 insertion(+) diff --git a/data/colord.conf.in b/data/colord.conf.in index 7e2617f..4f1c585 100644 --- a/data/colord.conf.in +++ b/data/colord.conf.in @@ -1,2 +1,3 @@ d @localstatedir@/lib/colord 0755 @daemon_user@ @daemon_user@ d @localstatedir@/lib/colord/icc 0755 @daemon_user@ @daemon_user@ +Z @localstatedir@/lib/colord 0755 @daemon_user@ @daemon_user@ -- cgit v1.2.1