I have two FreeNAS instances, one a clean install and one recently upgraded from 11.1-U7. Both are on the latest 11.3-RELEASE (STABLE)
I set up a Cron Job task and set "Run as User" field to
At the command line, I get this (correct) output:
From the Cron Job output running the same command
Same exact command and cron job settings (including the upgraded instance) used to work as expected in 11.1-U7 and prior versions.
For now, my workaround is to set the Cron Job to run as root, using sudo:
Incidentally, the root user under 11.1-U7 did have the "Permit Sudo" enabled, and after migrating to 11.3-RELEASE that field was unchecked. Unsure if that is related.
Is there a change in the 11.3-RELEASE that does not inherit the user's groups when running a Cron Job?
I set up a Cron Job task and set "Run as User" field to
john
, input the appropriate command, and received errors I tracked down to permission issues. Very similar to https://www.ixsystems.com/community...-u6-cron-not-working-permission-denied.70925/At the command line, I get this (correct) output:
Code:
root@freenas >id uid=0(root) gid=0(wheel) groups=0(wheel) john@freenas >id uid=1001(john) gid=1001(john) groups=1001(john),816(media),972(plex),983(syncthing),1002(backup)
From the Cron Job output running the same command
id
, I get this via email:Code:
#"Run as User" set to root uid=0(root) gid=0(wheel) groups=0(wheel) #"Run as User" set to john uid=1001(john) gid=1001(john) groups=1001(john)
Same exact command and cron job settings (including the upgraded instance) used to work as expected in 11.1-U7 and prior versions.
For now, my workaround is to set the Cron Job to run as root, using sudo:
Code:
#"Run as User" set to root #Command altered to #sudo -i -u john id uid=1001(john) gid=1001(john) groups=1001(john),816(media),972(plex),983(syncthing),1002(backup)
Incidentally, the root user under 11.1-U7 did have the "Permit Sudo" enabled, and after migrating to 11.3-RELEASE that field was unchecked. Unsure if that is related.
Is there a change in the 11.3-RELEASE that does not inherit the user's groups when running a Cron Job?