Я использую версию Debian 7.4
Файл /etc/pam.d/su там
не включает pam_limits.so
фрагмент:
# Sets up user limits, please uncomment and read /etc/security/limits.conf
# to enable this functionality.
# (Replaces the use of /etc/limits in old login)
# session required pam_limits.so
Это почему ?
поискал в Google статьи вроде
https://my.vertica.com/docs/6.0.x/HTML/index.htm#14567.htm
On some systems the pam module called pam_limits.so is not set in the file /etc/pam.d/su. When it is not set, it prevents the conveying of limits (such as open file descriptors) to any command started with su -
In particular, the HP Vertica init script would fail to start HP Vertica because it calls the Administration Tools to start a database with the su - command. This problem was first noticed on Debian systems, but the configuration could be missing on other Linux distributions.
To resolve this issue, modify the install_vertica script and append this line to the /etc/pam.d/su file:
session required pam_limits.so
По умолчанию (без ограничений) работает большинство людей. Для большинства одноцелевых, однопользовательских и небольших многопользовательских систем модуль ограничений не требуется, потому что вы не столкнетесь ни с одной из них; в этом отношении небольшой системный пользователь, столкнувшийся с ошибкой, связанной с ulimit, вероятно, не знает, как с ней справиться. Более того, /etc/security/limits.conf
не поставляется предварительно сконфигурированным, потому что нет способа узнать, каковы будут ваши потребности, поэтому вам все равно придется настраивать конфигурацию, чтобы установить ограничения. Можно также сэкономить (скудные) ресурсы для большинства людей и позволить тем немногим, кто в этом нуждается, включить эту функцию.