Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

sharding: Make nginx shard map owned by zulip:zulip.

Alex Vandiver6249c2f97034
diff --git a/puppet/zulip/manifests/tornado_sharding.pp b/puppet/zulip/manifests/tornado_sharding.pp
index d474abdd498..99865326785 100644
--- a/puppet/zulip/manifests/tornado_sharding.pp
+++ b/puppet/zulip/manifests/tornado_sharding.pp
@@ -7,8 +7,8 @@ class zulip::tornado_sharding {
# the sharding script afterwards and Puppet shouldn't overwrite them.
file { '/etc/zulip/nginx_sharding_map.conf':
ensure => file,
- owner => 'root',
- group => 'root',
+ owner => 'zulip',
+ group => 'zulip',
mode => '0644',
notify => Service['nginx'],
content => @(EOT),
diff --git a/scripts/refresh-sharding-and-restart b/scripts/refresh-sharding-and-restart
index 8fb9d9235b1..f684a58bb85 100755
--- a/scripts/refresh-sharding-and-restart
+++ b/scripts/refresh-sharding-and-restart
@@ -12,7 +12,7 @@ if ! [ -e /etc/zulip/nginx_sharding_map.conf.tmp ] || ! [ -e /etc/zulip/sharding
exit 1
fi
-chown root:root /etc/zulip/nginx_sharding_map.conf.tmp
+chown zulip:zulip /etc/zulip/nginx_sharding_map.conf.tmp
chmod 644 /etc/zulip/nginx_sharding_map.conf.tmp
chown zulip:zulip /etc/zulip/sharding.json.tmp
chmod 644 /etc/zulip/sharding.json.tmp