Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In one of our compute clusters, we have systems with unique hardware resources to which access is controlled by device-file permissions. Each node has two or four of these, and multiple CPU cores. We'd like to be able to schedule different users' jobs on the same node and restrict access to the properly-assigned resources. (Some queues might even be CPU-only, with no access.)

For a while, we were running with a "hey, pay attention and play nice" policy, but that's hard for everyone to keep straight even with the best intentions. So instead we just schedule the entire node for a given user at a time. This is wasteful for single-threaded, single-process tasks.

With Torque, one can run a prologue script as root before the job starts. This could be made to set the device permissions appropriately. But we're running (née Sun) Grid Engine. That has per-queue prolog scripts, but they runs as the user to whom the job belongs (like Torque's prologue.user), which is no help here.

Is there something obvious I'm missing (I hope), or an alternate way to approach this? I realize that I have the source code and therefore can do anything, but I'm hoping there's a standard way I'm just missing.


share|improve this question
up vote 4 down vote accepted

The prolog script can actually be run as any user.

From man queue_conf:


The executable path of a shell script that is started before execution of Grid Engine jobs with the same environment set- ting as that for the Grid Engine jobs to be started afterwards. An optional prefix "user@" specifies the user under which this procedure is to be started.

So setting prolog root@/path/to/prolog should have it execute as root.

share|improve this answer
That sounds like the obvious thing I was missing. :) Off to try it... – mattdm Jan 18 '11 at 20:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.