On CentOS/RHEL 6, when I start my daemon as root user, I see /proc/<pid>/loginuid of the process as 0 and when I start it through sudo, I see loginuid of the sudo user. Even if I do sudo su - to become root, I see loginuid of the sudo user. My doubt is whether the process limits of open files, memory etc change when loginuid is non-root ? Or for that matter any other factor which causes performance drop when loginuid is non-root ?

  • Are you asking about ulimit of sudo user's process? Jul 25, 2015 at 13:33

1 Answer 1


The fact that the login UID doesn't change after sudo or su is the whole point of a having login UID, separate from the real and effective UIDs. It's meant for logging purposes.

Neither the login UID nor any other UID of a process has a direct impact on a process's limits or performance.

Limits are set by the program that logs you in. After that, they are inherited by all the programs in the session, even if you call sudo or su or some other program to change to another user. A program can change the limits that apply to it, but only up to a point: there's a soft limit, which programs can change, and a hard limit, which programs can't change unless running as root¹. Normal programs don't change their limits.

¹ or having the appropriate capability, which normally only root has.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .