nixos/postgresqlBackup: set to umask to 0077

* Ensure that the backup file is only readable by the owner
* Add file permission test to tests
This commit is contained in:
Markus Kowalewski
2018-11-06 21:59:29 +01:00
parent 0d30f7b023
commit a0371d4761
2 changed files with 3 additions and 0 deletions

View File

@@ -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;
'';