3

I'm running Ubuntu 12.04. My problem is that the ulimit values described in limits.conf are not being applied when I SSH into my server using a non root account. Either that or they are being applied and overridden.

I've added the appropriate values in /etc/security/limits.conf

* soft nofile 64000
* hard nofile 64000

I don't want it to apply to the root, so this is fine. I've also added session required pam_limits.so to the files in /etc/pam.d. Added to

/etc/pam.d/login
/etc/pam.d/common-session
/etc/pam.d/sshd
/etc/pam.d/su

And I've rebooted my server a couple of times. However the file open limit always shows as 1024 for soft and 4096 for hard. My .bashrc and .profile for the user in question files do not seem to contain anything that would change this value.

If I login as root and run the command via su, then I get the expected ulimit.

su nodeserver
ulimit -n
#result is 64000

But the when I SSH as nodeserver I get a value of 4096.

  1. Are there any other places I should look at where this value might be set?
  2. Can I look at a list of startup scripts / commands that ran when the nodeserver user logged in?

It's pretty much what's going on here except there doesn't seem to be anything in my startup scripts - "open files" ulimit: controlling via limits.conf

1

0

You must log in to answer this question.

Browse other questions tagged .