From 15f2f444d75181837abfc54428cd5d70450f67bf Mon Sep 17 00:00:00 2001 From: Aneesh Agrawal Date: Fri, 22 Apr 2016 02:14:01 -0400 Subject: [PATCH] Ensure Buildbot master files are owned by servo If the Buildbot master is ever erroneously started as root, the permissions on a variety of files in the Buildbot master dir are clobbered and the Buildbot master process is unable to access them. Use a file.directory state to set ownership to servo:servo for the whole folder, so that a highstate will restore the correct permissions in case this happens. --- buildbot/master/init.sls | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/buildbot/master/init.sls b/buildbot/master/init.sls index c7905c0d..c0c70a85 100644 --- a/buildbot/master/init.sls +++ b/buildbot/master/init.sls @@ -30,6 +30,15 @@ buildbot-master: - context: common: {{ common }} +ownership-{{ common.servo_home }}/buildbot/master: + file.directory: + - name: {{ common.servo_home }}/buildbot/master + - user: servo + - group: servo + - recurse: + - user + - group + /etc/init/buildbot-master.conf: file.managed: - source: salt://{{ tpldir }}/files/buildbot-master.conf