summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Thompson <wjt@endlessm.com>2019-03-15 10:19:39 +0000
committerRichard Hughes <richard@hughsie.com>2019-03-15 16:31:24 +0000
commit0a583556e460311a7767dad30e49b5232655f069 (patch)
treeb4860990ba197657ccd6e2e9af2f655dc68b69ac
parent55321abdcd06b0246b59dd2d94559a293763a894 (diff)
downloadcolord-0a583556e460311a7767dad30e49b5232655f069.tar.gz
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.
-rw-r--r--data/colord.conf.in1
1 files changed, 1 insertions, 0 deletions
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@