diff --git a/secrets b/secrets index dace9b5..33fb326 100755 --- a/secrets +++ b/secrets @@ -91,16 +91,13 @@ echo "!*data" >&2 read basedir if test ! -d "$basedir"; then - mkdir "$basedir" - chown root:root "$basedir" - chmod 755 "$basedir" + install -o root -g root -m 755 -d "$basedir" fi rm -rf "$basedir"/* while read name; do fullpath="$basedir/$name" - touch "$fullpath" - chmod 600 "$fullpath" + install -o root -g root -m 600 /dev/null "$fullpath" read size head --bytes="$size" - > "$fullpath" read owner