From fc2d60f963f6388bdfb56b32c84afa1ee5c0f887 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sun, 13 May 2018 13:03:44 +0200 Subject: Permissions --- recv | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'recv') diff --git a/recv b/recv index ed1e0ed..1230ae0 100644 --- a/recv +++ b/recv @@ -8,6 +8,9 @@ user="$1" recvDir="$(getent passwd "$user" | cut -f6 -d:)/uucppublic" [[ -d "$recvDir" ]] || exit 1 -umask 027 +recvDir=$(mktemp -d -p "$recvDir" recv.XXXXXXXXXX) +chown "$user" "$recvDir" +chmod 750 "$recvDir" -exec @gnutar@/bin/tar -xv -C $(mktemp -d -p "$recvDir" recv.XXXXXXXXXX) --owner "$user" --no-same-permissions \ No newline at end of file +umask 027 +exec @gnutar@/bin/tar -xv -C "$recvDir" --owner "$user" --no-same-permissions \ No newline at end of file -- cgit v1.2.3