diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2018-05-13 13:03:44 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2018-05-13 13:03:44 +0200 |
commit | fc2d60f963f6388bdfb56b32c84afa1ee5c0f887 (patch) | |
tree | 7494f850451898cc5e2e1eb29ab566eb7bfbe3ac | |
parent | e5d3fd420ff355d8399de0df2f601772951c0e63 (diff) | |
download | utils-fc2d60f963f6388bdfb56b32c84afa1ee5c0f887.tar utils-fc2d60f963f6388bdfb56b32c84afa1ee5c0f887.tar.gz utils-fc2d60f963f6388bdfb56b32c84afa1ee5c0f887.tar.bz2 utils-fc2d60f963f6388bdfb56b32c84afa1ee5c0f887.tar.xz utils-fc2d60f963f6388bdfb56b32c84afa1ee5c0f887.zip |
Permissions
-rw-r--r-- | nix/recv.nix | 2 | ||||
-rw-r--r-- | recv | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/nix/recv.nix b/nix/recv.nix index d24d412..1634b61 100644 --- a/nix/recv.nix +++ b/nix/recv.nix | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | stdenv.mkDerivation rec { | 5 | stdenv.mkDerivation rec { |
6 | name = "recv-${version}"; | 6 | name = "recv-${version}"; |
7 | version = "0.3"; | 7 | version = "0.4"; |
8 | src = ../recv; | 8 | src = ../recv; |
9 | 9 | ||
10 | phases = [ "buildPhase" "installPhase" ]; | 10 | phases = [ "buildPhase" "installPhase" ]; |
@@ -8,6 +8,9 @@ user="$1" | |||
8 | recvDir="$(getent passwd "$user" | cut -f6 -d:)/uucppublic" | 8 | recvDir="$(getent passwd "$user" | cut -f6 -d:)/uucppublic" |
9 | [[ -d "$recvDir" ]] || exit 1 | 9 | [[ -d "$recvDir" ]] || exit 1 |
10 | 10 | ||
11 | umask 027 | 11 | recvDir=$(mktemp -d -p "$recvDir" recv.XXXXXXXXXX) |
12 | chown "$user" "$recvDir" | ||
13 | chmod 750 "$recvDir" | ||
12 | 14 | ||
13 | exec @gnutar@/bin/tar -xv -C $(mktemp -d -p "$recvDir" recv.XXXXXXXXXX) --owner "$user" --no-same-permissions \ No newline at end of file | 15 | umask 027 |
16 | exec @gnutar@/bin/tar -xv -C "$recvDir" --owner "$user" --no-same-permissions \ No newline at end of file | ||