diff options
author | Paul van Tilburg <paul@luon.net> | 2023-07-23 12:14:59 +0200 |
---|---|---|
committer | Paul van Tilburg <paul@luon.net> | 2023-07-23 12:37:38 +0200 |
commit | 8cf408e96689afc3a03afd1209cdc9cdc68330d3 (patch) | |
tree | 2e469128ad90ce92feb7a282bfe284de0886e67b /debian | |
parent | 1e560529d8aa95503f5e037576ec64500eb16881 (diff) | |
download | conduit-8cf408e96689afc3a03afd1209cdc9cdc68330d3.zip |
Fix up permissions of the database path
Also apply the database creation and ownership change on every
installation and upgrade.
Diffstat (limited to 'debian')
-rw-r--r-- | debian/postinst | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/debian/postinst b/debian/postinst index 73e554b..dfa599d 100644 --- a/debian/postinst +++ b/debian/postinst @@ -19,11 +19,11 @@ case "$1" in _matrix-conduit fi - # Create the database path if it does not exist yet. - if [ ! -d "$CONDUIT_DATABASE_PATH" ]; then - mkdir -p "$CONDUIT_DATABASE_PATH" - chown _matrix-conduit "$CONDUIT_DATABASE_PATH" - fi + # Create the database path if it does not exist yet and fix up ownership + # and permissions. + mkdir -p "$CONDUIT_DATABASE_PATH" + chown _matrix-conduit "$CONDUIT_DATABASE_PATH" + chmod 700 "$CONDUIT_DATABASE_PATH" if [ ! -e "$CONDUIT_CONFIG_FILE" ]; then # Write the debconf values in the config. |