Welcome to the Linux Foundation Forum!

Exercise 3.1: Controlling Processes with ulimit

RaulSouzaRaulSouza Posts: 1
edited March 8 in LFS201 Class Forum

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

  • k0dardk0dard Posts: 51
    edited March 16

    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.

Sign In or Register to comment.