Public bug reported:

I recently upgraded from Ubuntu 14 to 18 and now I can't use ulimit -n
to increase the allowed number of files open! This is a change from my
previous version of Ubuntu.

Lines from /etc/security/limits.conf
jonesdc          hard    nofile          100000
jonesdc          soft    nofile          10000

Setting in /etc/sysctl.conf
# Max open files (system limit)
fs.file-max = 100000

When I first open a terminal if I type 
$ulimit -n 1000
then
$ulimit -a 
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) 10000
pending signals                 (-i) 30927
max locked memory       (kbytes, -l) 16384
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1000
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) 30927
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

Now if I type
$ulimit -n 999
and then try again
$ulimit -n 1000
bash: ulimit: open files: cannot modify limit: Operation not permitted

Looking further, it appears that ulimit -n changes both the hard and soft limits
$ulimit -H -a
core file size          (blocks, -c) unlimited
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 30927
max locked memory       (kbytes, -l) 16384
max memory size         (kbytes, -m) unlimited
open files                      (-n) 999
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) unlimited
cpu time               (seconds, -t) unlimited
max user processes              (-u) 30927
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

** Affects: lightdm (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1825188

Title:
  Just upgraded to ubunt 18 and now ulimit -n changes hard and soft
  limits

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lightdm/+bug/1825188/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to