Non-privileged user get 'Operation not permitted' when using sched_setscheduler

Solution Verified - Updated -

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.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content