Technique "Cron job v3.0" does not use the "user" setting with predefined scheduled
I had set up a cron job v3 in this technique and defined a certain user to be used.
The interval I set to "hourly" since that was fine.
It seems (at least) when using a predefined interval rudder drops the cron file in the /etc/cron.<interval> folder, forgetting about the run-as setting three lines above.
Of course this has some security implications, not to mention messed up permissions.
At least the rule configuration needs to be clear and direct about this.
I'd also bed you to have a dozen unit tests on this that test all the different code paths since they seem to be pretty independent.
[root@rudder cron.hourly]# cat /etc/cron.hourly/job-myuser
echo "id ; hallo" > /tmp/hallo
after the next cron hourly run we end up with this file:
[root@rudder cron.hourly]# ls -ltr /tmp/hallo
-rw-r--r-- 1 root root 11 Feb 29 22:01 /tmp/hallo
Reproduced in a clean env, same result.
#6 Updated by Nicolas CHARLES 3 months ago
- Status changed from In progress to Pending technical review
- Assignee changed from Nicolas CHARLES to Félix DALLIDET
- Pull Request set to https://github.com/Normation/rudder-techniques/pull/1368
#8 Updated by Nicolas CHARLES 3 months ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder-techniques|d22a96c9b7d026ead15947d7c94c78007bd91bd8.