From f1327c52ef545acde722976b2c9efce166d42d0e Mon Sep 17 00:00:00 2001 From: Matej Ferencevic <matej.ferencevic@memgraph.io> Date: Fri, 13 Mar 2020 13:35:08 +0100 Subject: [PATCH] Fix ownership of examples in packages Reviewers: teon.banek, ipaljak Reviewed By: teon.banek Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D2721 --- release/debian/postinst | 4 +++- release/rpm/community/memgraph.spec.in | 4 +++- release/rpm/enterprise/memgraph.spec.in | 4 +++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/release/debian/postinst b/release/debian/postinst index 81cd186c6..e126af578 100644 --- a/release/debian/postinst +++ b/release/debian/postinst @@ -34,11 +34,13 @@ case "$1" in if [ ! -d $i/telemetry ]; then mkdir $i/telemetry || exit 1 fi - chown -R memgraph:memgraph $i/telemetry || exit 1 # Make snapshots directory immutable (optional) chattr +i -R $i/snapshots || true done + # Change ownership of all examples + chown -R memgraph:memgraph /usr/share/memgraph/examples || exit 1 + # Generate SSL certificates if [ ! -d /etc/memgraph/ssl ]; then mkdir /etc/memgraph/ssl || exit 1 diff --git a/release/rpm/community/memgraph.spec.in b/release/rpm/community/memgraph.spec.in index 50b9ee153..22e2db896 100644 --- a/release/rpm/community/memgraph.spec.in +++ b/release/rpm/community/memgraph.spec.in @@ -76,11 +76,13 @@ for i in /usr/share/memgraph/examples/*; do if [ ! -d $i/telemetry ]; then mkdir $i/telemetry || exit 1 fi - chown -R memgraph:memgraph $i/telemetry || exit 1 # Make snapshots directory immutable (optional) chattr +i -R $i/snapshots || true done +# Change ownership of all examples +chown -R memgraph:memgraph /usr/share/memgraph/examples || exit 1 + # Generate SSL certificates if [ ! -d /etc/memgraph/ssl ]; then mkdir /etc/memgraph/ssl || exit 1 diff --git a/release/rpm/enterprise/memgraph.spec.in b/release/rpm/enterprise/memgraph.spec.in index 7cdbf9636..10c533040 100644 --- a/release/rpm/enterprise/memgraph.spec.in +++ b/release/rpm/enterprise/memgraph.spec.in @@ -76,11 +76,13 @@ for i in /usr/share/memgraph/examples/*; do if [ ! -d $i/telemetry ]; then mkdir $i/telemetry || exit 1 fi - chown -R memgraph:memgraph $i/telemetry || exit 1 # Make snapshots directory immutable (optional) chattr +i -R $i/snapshots || true done +# Change ownership of all examples +chown -R memgraph:memgraph /usr/share/memgraph/examples || exit 1 + # Generate SSL certificates if [ ! -d /etc/memgraph/ssl ]; then mkdir /etc/memgraph/ssl || exit 1