Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to raise the open file descriptor maximum for all users on an ubuntu machine.

I've added the following lines to /etc/security/limits.conf:

*               soft    nofile           100000
*               hard    nofile           100000

And, based on this question I've checked the /etc/pam.conf settings for pam_limits:

$ grep "pam_limits" /etc/pam.d/*
/etc/pam.d/atd:session    required
/etc/pam.d/common-session:session required
/etc/pam.d/cron:session    required
/etc/pam.d/login:session    required
/etc/pam.d/sshd:session    required
/etc/pam.d/su:session    required
/etc/pam.d/sudo:session required

And my file-max seems to be fine:

$ cat /proc/sys/fs/file-max 

Yet I still have the default 1024 when I check ulimit -a:

$ ulimit -a | grep files
open files                      (-n) 1024

What else can I check?

share|improve this question
Also, just as additional clarification: A ulimit -n 100000 does work as expected (although it doesn't help me because it only persists in the current login session). – bantic Feb 15 '11 at 16:31
up vote 9 down vote accepted

I figured out that the system doesn't seem to like the wildcard for the user in limits.conf. Changing that to: root soft nofile 100000 and root hard nofile 100000 worked fine.

share|improve this answer
Must be a bug in Ubuntu. I verified that wildcards work in Fedora 14. – Mark Wagner Feb 14 '11 at 20:13
Wildcards work, but do not affect the root account. says 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. – Stobor Jul 27 '11 at 5:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.