When a file to which you have read access as regular user is opened in emacs, the buffer is marked read-only. If the user escalates to root and opens the same file in emacs, the buffer still remains read-only. To modify the file, the user needs to toggle the read-only behaviour of the buffer (for which the default key binding is C-x C-q) first.
Here I write about various events I was involved in and ideas that inspired me. Recently, it is more of a linux blog because I have been doing a lot of work on it. However, off and on I write on various other things that my mind just can't let go easily.
Thursday, 16 November 2017
Increasing the maximum number of file descriptors allowed per user on Cent OS 6
For some applications like elasticsearch, the maximum number of file descriptors needs to quite high. The way of modifying the value varies from distro to distro. In Cent OS6, the following did not work.
1. Using
2. Using
After the above approaches, when you check the value using the following, the value will show up.
However, setting the values as root, does not change the values for other regular users. To set it specifically for any user, change the value in
<user> soft nofile <value>
1. Using
sysctl
as rootsysctl -w fs.file-max=100000
2. Using
ulimit
as rootAfter the above approaches, when you check the value using the following, the value will show up.
cat /proc/sys/fs/file-max
However, setting the values as root, does not change the values for other regular users. To set it specifically for any user, change the value in
/etc/security/limits.conf
file. Setting only the soft or hard limit will not be sufficient. Therefore, the following lines should be added.<user> soft nofile <value>
<user> hard nofile <value>
After the modifications, it is required to logout and log back into the system.
Subscribe to:
Posts (Atom)