Mailing List Archive


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

Re: [tlug] ulimit



Stephen J. Turnbull wrote:
> 
> RTFM setrlimit(2), bash(1).  Only root can _raise_ hard limits; for
> processes owned by any other user, limit setting can only decrease
> them.  bash's implementatation of ulimit sets both unless the -H or -S
> option is specified.

Whoops, sorry.  Double checked the man page and of course,
$ ulimit -Sn 1024
$ ulimit -Sn 8192
works without errors.

> How do you log in?  It is the login(1) program that reads
> /etc/security/limits.conf, so that needs to be part of the process.

Logging in from the console calls login(1) so the limits are set correctly.
I was logging in using ssh.  I checked /etc/ssh/sshd_config and the
sshd_config man page and the default for UseLogin is 'no' so
/etc/security/limits.conf is not being read as part of my ssh log in.

Logging in from both the console and ssh at the same time the same user
gets two different limits.  I thought that this limit was the maximum
number of open files allowed for a particular user but this can't be the
case if the same user can have two different limits at the same time.
Therefore, is this limit the max open files for all processes started
from this shell?

> Check the rc files (/etc/profile, ~/.login, ~/.bashrc) for ulimits.

I grepped /etc and ~/ for ulimits and should have written that in my
original post.

Thanks for the help.

-- 
simon colston



Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links