[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: limits.conf



I can confirm this. I wasn't sure if it was expected behaviour so I
did a quick google search and came to this
http://www.chrissearle.org/blog/technical/increasing_max_number_open_files_glassfish_user_debian.

If you want 'su' to set the user limits you need to modify
/etc/pam.d/su and uncomment the line "# session required
pam_limits.so". I tried it and it works.

Given that this option exists, it's most likely not a bug.

Guido

On Sat, Apr 6, 2013 at 12:30 PM, Thilo Six <T.Six@gmx.de> wrote:
> Hello
>
> i have observed a to my (limited) understanding a strange behavior regarding
> limits settings. I would like some hint if i am doing s.th. wrong or if i
> encountered a bug.
>
>
> i have the following:
> ----------------------------------------------------
>         /etc/security/limits.conf
> ----------------------------------------------------
> *           -     nproc   512
> root        soft  nproc   1024
> root        hard  nproc   2048
>
> *           -     nofile  8192
> root        -     nofile  16383
> ----------------------------------------------------
>
> limits.conf(5):
> NOTE: group and wildcard limits are not applied to the root
>       user. To set a limit for the root user, this field must
>       contain the literal username root.
>
>
> With the settings above applied when i log in on a vt as root i get the
> follwoing limits for user root:
>
> root on vt:
> # ulimit -Hu
> 2048
> # ulimit -Hn
> 16383
> # ulimit -Su
> 1024
> # ulimit -Sn
> 16383
>
>
> ^- These are excepted results.
>
>
> Now when i log into kde and start konsole or a xterm and 'su -' i get the following:
>
> root in kde:
> # ulimit -Sn
> 8192
> # ulimit -Hn
> 8192
> # ulimit -Su
> 512
> # ulimit -Hu
> 512
>
>
> su(1):
>   -, -l, --login
>       Provide an environment similar to what the user would
>       expect had the user logged in directly.
>
> As you can see in this case the limits defined for a ordinary user are applied
> for root. IMO this is a bug as it breaks documented behavior.
>
> Should this be reported or am i missing s.th.?
>
> --
> Regards,
> Thilo
>
> 4096R/0xC70B1A8F
> 721B 1BA0 095C 1ABA 3FC6  7C18 89A4 A2A0 C70B 1A8F
>
>
>
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> Archive: [🔎] kjpf2b$b93$1@ger.gmane.org">http://lists.debian.org/[🔎] kjpf2b$b93$1@ger.gmane.org
>


Reply to: