Welcome to the Linux Foundation Forum!

Exercise 3.1: Controlling Processes with ulimit

the last step of the exercise says:
[4. Try to set the limit back to the previous value. Did it work? ]

It is proven that it does not work, but i didn't understand what is the limitation/reason.

Please, could you kindly explain?

Thank You,
Raul de Souza.

Comments

  • Posts: 115
    edited March 2021

    Hello RaulSouza,

    The reason this does not work is that when you issue, for example

    ulimit -n 2048

    you're setting a new soft limit AND a new hard limit for the user. Afterwards you can't raise new hard limit above the current hard limit (without root privileges)

    If you on the other hand do

    ulimit -S -n 2048

    you will change only your soft limit and you can afterwards raise your soft limit further, up to the hard limit value.

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training