システムオープンファイルの設定を永久に変更したいのですが、動作しません。Debian Stretchで普通のユーザのために開いているファイル(ulimit -n)を永久に変更するには?
ログインユーザーは通常のユーザーで、root
ではありません。
ファイル/etc/sysctl.conf
$ grep 'fs.file-max' /etc/sysctl.conf
fs.file-max = 800000
ファイル/etc/security/limits.conf
を設定/etc/security/limits.conf
$ grep nofile /etc/security/limits.conf
# - nofile - max number of open files
* soft nofile 655360
* hard nofile 655360
はCentOSの/ openSUSEの上の仕事ですが、それはDebianでは作品ではない:私は、次の操作をしました。
ファイル/etc/pam.d/login
はすでにそれを持って、ファイル/etc/pam.d/common-session{,-noninteractive}
に
session required pam_limits.so
を追加します。絶対パスは
/lib/x86_64-linux-gnu/security/pam_limits.so
ulimit -n
、リブート後、実行、出力はまだデフォルト値です。
$ ulimit -n
1024
有効にするにはどうすればよいですか?
は、あなたはこれを試したことがありますか? https://serverfault.com/questions/610130/how-to-set-ulimit-value-permanently –