Changing the UserID used by JobScheduler
Question
One of the files on our file system has an owner that is different to the user ID used by our JobScheduler.
This is causing the following errors:
2012-10-15 18:26:27.360 [info] SCHEDULER-918 state=starting (at=2012-10-15 18:26:27.333) 2012-10-15 18:26:27.361 [info] SCHEDULER-987 Starting process: '/bin/sh' '-c' '"/tmp/schedule/sos.w6p0JW"' 2012-10-15 18:26:27.475 [info] /tmp/schedule/sos.w6p0JW: line 4: ./TDloadFIM: Permission denied 2012-10-15 18:26:27.475 [info] SCHEDULER-915 Process event 2012-10-15 18:26:27.476 [ERROR] SCHEDULER-280 Process terminated with exit code 126 (0x7E)
I noticed there is a SETUID that could be used, I have looked through the FAQ, could you give us some information please as this could fix our issue?
Answer
There are two possible solutions if you are running on Unix:
- Use sudo in the JobScheduler job : sudo -u other_user script_for_other_user.sh
Make sure that other_user don't need a password for sudo. For this edit the _sudoers_ file.
- If the owner of the file you want to access does not have to authenticate with a password, you can use the
sudo
command within a script job. - Use the JobScheduler's
setuid
executible. This is described:
If the file system you are accessing is on another computer and all the files you are acessing have the same owner you can either use SSH or a JobScheduler Agent.