Skip to end of metadata
Go to start of metadata

Changing the UserID used by JobScheduler on Unix systems

Question

One of the files on our file system belongs to a different user to that used by our JobScheduler.
This is causing the following errors:

I noticed there is a setuid utility that could be used, I have looked through the FAQ, could you give us some information please as this could fix our issue?

Answer

The setuid utility is deprecated.

  • FEATURE AVAILABILITY ENDING WITH RELEASE 1.11
  • JS-1565 - Retirement of setuid utility to access files owned by a different user Removed

 

There are multiple ways running jobs with different user ids in order to access objects belonging to a different user:

  • Use Agent instances

  • Use sudo in the JobScheduler job

    • To access a file belonging to "other_user" use 
      sudo -u other_user script_for_other_user.sh 

    • Make sure that other_user doesn't require a password for sudo. This can be achieved by adjusting the configuration from the sudoers file. This method is extremely flexible - you can change the user more than once within a job. if sudo requires a password then you can use 
      echo "<password>" | sudo -S -u other_user script_for_other_user.sh