chmod 0755 root directory so that other users (like _apt) can access it
This commit is contained in:
parent
0cdd803ba0
commit
fcc40dc122
1 changed files with 6 additions and 0 deletions
|
@ -1151,6 +1151,12 @@ sub main() {
|
||||||
# since the output is a tarball, we create the rootfs in a temporary
|
# since the output is a tarball, we create the rootfs in a temporary
|
||||||
# directory
|
# directory
|
||||||
$options->{root} = tempdir();
|
$options->{root} = tempdir();
|
||||||
|
# in unshare and root mode, other users than the current user need to
|
||||||
|
# access the rootfs, most prominently, the _apt user. Thus, make the
|
||||||
|
# temporary directory world readable.
|
||||||
|
if (grep { $_ eq $options->{mode} } ('unshare', 'root')) {
|
||||||
|
chmod 0755, $options->{root} or die "cannot chmod root: $!";
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
# user does not seem to have specified a tarball as output, thus work
|
# user does not seem to have specified a tarball as output, thus work
|
||||||
# directly in the supplied directory
|
# directly in the supplied directory
|
||||||
|
|
Loading…
Reference in a new issue