Fix #282: '/bin/ash': Permission denied

This was a regression from the improved input validation PR, which
created the chroot_native folder with the wrong permissions (to test
if we have write access to the work folder).

sjamaan found out, that this was the cause of the issue, and also
explained how to fix it, thanks a lot!
This commit is contained in:
Oliver Smith 2017-07-28 22:15:51 +02:00
parent 7283f03315
commit 8b17ac05ea
No known key found for this signature in database
GPG Key ID: 5AE7F5513E0885CB
1 changed files with 2 additions and 1 deletions

View File

@ -39,7 +39,8 @@ def ask_for_work_path(args):
try:
ret = os.path.expanduser(pmb.helpers.cli.ask(
args, "Work path", None, args.work, False))
os.makedirs(ret + "/chroot_native", 0o700, True)
os.makedirs(ret, 0o700, True)
os.makedirs(ret + "/chroot_native", 0o755, True)
return ret
except OSError:
logging.fatal("ERROR: Could not create this folder, or write"