Open nh2 opened 7 years ago
Turns out this was because my /mnt
was mounted with the noexec
(is it possible that this is the default in Ubuntu 16.04?).
I solved it with mount -o remount,exec /tmp
.
Ideally ./install
would detect this.
is it possible that this is the default in Ubuntu 16.04?
Looks like the answer is no, and that this is just some "security improvement" shipped by default by my server hoster.
Awesome job looking into this and I appreciate you reporting your results. I don't think remounting /tmp
is something that nixos-in-place should do, especially since it may not be a separate partition or mount in the first place.
I do think it's good having this ticket to will help anyone who's searching for the issue. Are you good with closing this? Did you NixOS install go through smoothly?
I agree that it's not the script's job to remount /tmp
.
I wonder though if it could check whether scripts from /tmp
can be executed at the start, because the error can be so confusing and many hosters where you'd need nixos-in-place
seem to like to do this. E.g. to place a bash script with no contents in the temporary dir it creates and execute it, and echo "Could not execute from /tmp, please check that it's not mounted noexec"
if that fails.
Got this on an Ubuntu 16.04 bare metal machine with LVM, on commit 8760ff58fa266d30b2175404134566218723e32a:
Not sure what the problem is.