You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by wo...@apache.org on 2019/08/26 05:41:54 UTC
[couchdb-pkg] branch master updated: fix etc/default.d/* ownership
(#51)
This is an automated email from the ASF dual-hosted git repository.
wohali pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb-pkg.git
The following commit(s) were added to refs/heads/master by this push:
new 43bfe76 fix etc/default.d/* ownership (#51)
43bfe76 is described below
commit 43bfe76c3e0c45dca4dfe77a26d6b9aadeca268b
Author: Joan Touzet <wo...@users.noreply.github.com>
AuthorDate: Mon Aug 26 01:41:50 2019 -0400
fix etc/default.d/* ownership (#51)
---
debian/couchdb.postinst | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/debian/couchdb.postinst b/debian/couchdb.postinst
index 3661125..e82b045 100644
--- a/debian/couchdb.postinst
+++ b/debian/couchdb.postinst
@@ -187,16 +187,22 @@ case $1 in
esac
# These should be owned by the couchdb user and group:
- chown couchdb:couchdb /opt/couchdb/etc
- chown couchdb:couchdb /opt/couchdb/etc/* >/dev/null 2>&1 || true
- chown couchdb:couchdb /var/lib/couchdb
- chown couchdb:couchdb /var/lib/couchdb/* >/dev/null 2>&1 || true
- chown couchdb:couchdb /var/lib/couchdb/shards/* >/dev/null 2>&1 || true
- chown couchdb:couchdb /var/lib/couchdb/shards/*/* >/dev/null 2>&1 || true
- chown couchdb:couchdb /var/lib/couchdb/.shards/* >/dev/null 2>&1 || true
- chown couchdb:couchdb /var/lib/couchdb/.shards/*/* >/dev/null 2>&1 || true
- chown couchdb:couchdb /var/log/couchdb
- chown couchdb:couchdb /var/log/couchdb/* >/dev/null 2>&1 || true
+ for i in "/opt/couchdb/etc
+ /opt/couchdb/etc/*
+ /opt/couchdb/etc/default.d/*
+ /opt/couchdb/etc/local.d/*
+ /var/lib/couchdb
+ /var/lib/couchdb/*
+ /var/lib/couchdb/shards/*
+ /var/lib/couchdb/shards/*/*
+ /var/lib/couchdb/.shards/*
+ /var/lib/couchdb/.shards/*/*
+ /var/log/couchdb
+ /var/log/couchdb/*"
+ do
+ chown couchdb:couchdb $i >/dev/null 2>&1 || true
+ done
+
# These should also not be world readable or writable:
find /opt/couchdb/etc -name *.ini -exec chmod 0640 {} \;
chmod a+x /opt/couchdb/bin/couchup