From 89ae4455bb4704135712a5581859bdb29d6c60f9 Mon Sep 17 00:00:00 2001 From: Benedikt Heine Date: Mon, 2 Dec 2024 21:28:49 +0100 Subject: [PATCH] Fix problems in umask You must set the umask to not spill the directory permissions $> umask 022 $> echo asdf1234 > password $> ls -la password -rw-r--r-- 1 bebe bebe 9 2. Dez 21:29 password $> rm password $> (umask 077; echo "my-super-safe-password" > password) $> ls -la password -rw------- 1 bebe bebe 23 Dec 2 21:28 password --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d01cda2..1aca7d4 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ used flakes: ```bash # enter disk encryption key - echo "my-super-safe-password" > /tmp/disk.key + (umask 077; echo "my-super-safe-password" > /tmp/disk.key) temp=$(mktemp -d) # ssh-host keys @@ -98,7 +98,7 @@ used flakes: 1. existing host ```bash - echo "my-super-safe-password" > /tmp/disk.key + (umask 077; echo "my-super-safe-password" > /tmp/disk.key) temp=$(mktemp -d) find $temp -printf '%M %p\n' ```