Project

General

Profile

Actions

Bug #8004

closed

Technique "Cron job v3.0" does not use the "user" setting with predefined scheduled

Bug #8004: Technique "Cron job v3.0" does not use the "user" setting with predefined scheduled

Added by Florian Heigl about 10 years ago. Updated over 7 years ago.

Status:
Released
Priority:
2
Category:
Techniques
Target version:
Severity:
Major - prevents use of part of Rudder | no simple workaround
UX impact:
User visibility:
Getting started - demo | first install | level 1 Techniques
Effort required:
Priority:
0
Name check:
Fix check:
Regression:

Description

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.

Updated by Jonathan CLARKE about 9 years ago Actions #1

  • Severity set to Major - prevents use of part of Rudder | no simple workaround
  • User visibility set to Getting started - demo | first install | level 1 Techniques

Updated by Benoît PECCATTE about 9 years ago Actions #2

  • Priority set to 45

Updated by Benoît PECCATTE almost 9 years ago Actions #3

  • Priority changed from 45 to 58

Updated by Nicolas CHARLES over 7 years ago Actions #4

  • Target version set to 4.1.17
  • Priority changed from 58 to 0

Updated by Nicolas CHARLES over 7 years ago Actions #5

  • Status changed from New to In progress
  • Assignee set to Nicolas CHARLES

Updated by Nicolas CHARLES over 7 years ago Actions #6

  • 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

Updated by Rudder Quality Assistant over 7 years ago Actions #7

  • Assignee changed from Félix DALLIDET to Nicolas CHARLES

Updated by Nicolas CHARLES over 7 years ago Actions #8

  • Status changed from Pending technical review to Pending release

Updated by François ARMAND over 7 years ago Actions #9

  • Subject changed from Cron daemon configuration (3.0) does not actually handle the user setting to Technique "Cron job v3.0" does not use the "user" setting with predefined scheduled
  • Description updated (diff)

Updated by Vincent MEMBRÉ over 7 years ago Actions #10

  • Status changed from Pending release to Released
This bug has been fixed in Rudder 4.1.17, 4.3.7 and 5.0.3 which were released today.
Changelog
Changelog
Changelog
Actions

Also available in: PDF Atom