I happened to see that on my Ubuntu 12.04 some resources of the root user is capped. I have not capped anything explicitly and my limits.conf as far as root user is concerned is empty. Here is the output of the ulimit -a on the root user
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 95931
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024
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) 95931
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
So I believe it is a default capping. So my question is what is the reason behind capping these resources of the root user by default? Now when I try to set the file limit to unlimited as root user by using the below command , I get an operation not permitted error.
ulimit -H -n unlimited
What prevents me from setting the limit to infinity and how safe it is to set it to infinity?