After the update to TrueNAS Scale 24.10.1 I cannot run any scripts anymore. I just verified it as well in a clean installation. I login with truenas_admin and create a simple shell script:
#!/bin/zsh
echo "Hello World"
Permissions are set as follows: -rwxrwxrwx 1 truenas_admin truenas_admin 30 Dec 18 09:13 test.sh
When I try to run it I get:
zsh: permission denied: ./test.sh
Same when using sudo
When I do a sudo su first, then the error changes:
sudo: process 8674 unexpected status 0x57f
zsh: killed ./test.sh
/home by default has the noexec property set on TrueNAS. There was a ZFS bug in earlier versions that caused this to not be evaluated properly for filesystems in the boot pool. TL;DR maybe put your scripts on the data pool. The boot pool should not be used for anything other than ephermeral data.
IMO this is an unexpected regression for a .1 release, even if it was a bug that it worked before. Cron jobs I had been using since 23.10 have been broken by this change.
We have posted a release note for this. It’s due to a bugfix in upstream ZFS since these paths should not have been executable. They were explicitly set as noexec since 24.04 was released (or maybe 23.10), but there were some ZFS properties that weren’t being properly loaded on boot, which allowed for accidental execution of scripts from that path.
Trying to run a script to format multiple devices in parallel. The devices I’m trying to format will comprise the data pool, but until then, I only have a boot pool. How can I execute the script without a data pool?