diff options
author | Markus Kowalewski <markus.kowalewski@gmail.com> | 2018-11-06 21:59:29 +0100 |
---|---|---|
committer | Markus Kowalewski <markus.kowalewski@gmail.com> | 2018-11-06 21:59:29 +0100 |
commit | a0371d476115a8fab54186664c9cca3d19e9537f (patch) | |
tree | db3d24306e8d508fe680852f890cd3e893df74c8 /nixos/tests/postgresql.nix | |
parent | 0d30f7b02307e39d0544022a03b450a1679ed068 (diff) |
nixos/postgresqlBackup: set to umask to 0077
* Ensure that the backup file is only readable by the owner * Add file permission test to tests
Diffstat (limited to 'nixos/tests/postgresql.nix')
-rw-r--r-- | nixos/tests/postgresql.nix | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/nixos/tests/postgresql.nix b/nixos/tests/postgresql.nix index f1f09277f342a..d2ea0aa899f8b 100644 --- a/nixos/tests/postgresql.nix +++ b/nixos/tests/postgresql.nix @@ -53,6 +53,7 @@ let # Check backup service $machine->succeed("systemctl start postgresqlBackup-postgres.service"); $machine->succeed("zcat /var/backup/postgresql/postgres.sql.gz | grep '<test>ok</test>'"); + $machine->succeed("stat -c '%a' /var/backup/postgresql/postgres.sql.gz | grep 600"); $machine->shutdown; ''; |