Hi,
I am running TrueNAS scale version ElectricEel-24.10.1 and there are two different odd behaviours that I’ve been experiencing.
First Odd Behaviour
There is a cronjob that was configured to run many versions prior to this update which continues to work with this update. Now after this update, I’ve tried to schedule a cronjob that resides in the /mnt/ path.
It looks something like this:
root@truenas[~]# ls -al /mnt/path/to/script/script.sh
-rwxr-xr-x 1 user1 group1 2078 May 20 12:01 /mnt/path/to/script/script.sh
Running it manually results it working just fine but scheduling it results in the following errors:
May 29 00:00:01 truenas cron[14128]: (root) CMD (/mnt/path/to/script/script.sh)
May 29 00:00:01 truenas cron[14128]: sudo: process 1060311 unexpected status 0x57f
May 29 00:00:01 truenas cron[14128]: Killed
cronjob is running under root and sudo is not involved so not sure why this error pops up. Can’t share the script here but I use the following shebang #!/bin/bash
and below is the cronjob config:
Second Odd Behaviour
Running a script in /tmp results in zsh: permission denied error even though file ownerships and permissions are correct.
root@truenas[~]# whoami
root
root@truenas[~]# ls -al /tmp/testscript.sh
-rwx------ 1 root root 111 May 20 12:15 /tmp/testscript.sh
root@truenas[~]# /tmp/testscript.sh
zsh: permission denied: /tmp/testscript.sh
root@truenas[~]# chmod 777 /tmp/testscript.sh
root@truenas[~]# /tmp/testscript.sh
zsh: permission denied: /tmp/testscript.sh
Running the same script within root home directory doesn’t cause any issue and it runs fine. I’ve seen some tickets addressing above issues but I couldn’t understand what the fix is. Please help. Cheers,