tid=59112& 本帖最後由 IT_man 於 2017-3-28 10:13 編輯
' \" R2 o% y ~' T4 q9 l
" p* f2 a0 Z( E1 k徵狀:3 B( g5 a9 _* s3 W4 K2 q6 N
' y5 l, M. w# s9 D# l! ]( ^0 ~, k, v某天因為需要從root su 到一般的user,指令如下:
; Q3 { G" A( t% e#su someuser 結果show error8 o# ]) w3 d0 l9 u |1 v
su: cannot set user id: Resource temporarily unavailable
- v- _0 {& [" k' C- [: `# q3 l
3 s* p4 t" r# Y i查了google得知根本原因是process 最大限制是 1024:9 \, l- i: t* ?* _& _0 w; }
, j Y; q! | V6 p8 ~! n
#cat /etc/security/limits.d/90-nproc.conf# N( ?* }, g" w
# Default limit for number of user's processes to prevent: H2 s) q7 ?' q; m0 s
# accidental fork bombs.
8 {3 t5 m* S3 ]* Q/ k# See rhbz #432903 for reasoning.5 t1 }: m4 i3 A1 w& E" I% }( w
0 q! D4 F+ N; A+ N. C3 G* soft nproc 1024 ====>將1024改成大一點如4096就 OK
]! {2 L5 V2 k' p# p- Q* Froot soft nproc unlimited
1 n0 s' R6 C( s+ f; E, c! r1 X: x" l4 \: |( x, b% Z/ H' f1 w+ h3 i
( _0 C% S1 `0 b8 J
5 y" A( g* U. n0 d6 T" l- B; n% p4 m3 \
$ V- W+ [; m: q2 ]# p0 {: ~
|