Non-privileged user get 'Operation not permitted' when using sched_setscheduler
Issue
When using sched_setscheduler
in a program to change the priority it works as expected, when it is run as root. When a non-privileged user runs it, the program fails with an EPERM
error - strace output:
sched_setscheduler(4798, SCHED_FIFO, { 89 }) = -1 EPERM (Operation not permitted)
sched_setscheduler(4798, SCHED_RR, { 28 }) = -1 EPERM (Operation not permitted)
Environment
- Red Hat Enterprise Linux
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.