From: Aurelien Jarno Date: Thu, 6 Apr 2017 07:17:29 +0000 (+0200) Subject: setup-dchroot: fix root directory permissions X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=439b70993ae56b0efc12c3eb3ab41cea6ad853ac;p=mirror%2Fdsa-puppet.git setup-dchroot: fix root directory permissions When using stretch, the debootstrap process does not change the permissions of the root directory of the chroot. As it is created with mktemp, it ends up not being readable by a normal user like "buildd". Change the permissions just before creating the tarball to avoid that. Signed-off-by: Aurelien Jarno --- diff --git a/modules/schroot/files/setup-dchroot b/modules/schroot/files/setup-dchroot index c1350cdbf..e63d72321 100755 --- a/modules/schroot/files/setup-dchroot +++ b/modules/schroot/files/setup-dchroot @@ -392,6 +392,7 @@ tartmp=$(tempfile --directory "$basedir" --suffix=".tar.gz") cleanup+=("rm -f $tartmp") ( cd "$rootdir" + chmod 0755 "$rootdir" tar caf "$tartmp" . if ! [ -z "$keep" ]; then savelog -l -c 4 "$target"