免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2856 | 回复: 5
打印 上一主题 下一主题

[C] 在root下用ulimit这样设置了,为什么切换用户后还是原样?? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-04-23 17:32 |只看该作者 |倒序浏览
在root下用ulimit这样设置了,为什么切换用户后还是原样??

[oracle@localhost]$ su
Password:
[root@localhost]# ulimit -s
10240
[root@localhost]# ulimit -s 1024000
[root@localhost]# ulimit -s
1024000
[root@localhost]# exit
exit
[oracle@localhost]$ ulimit -s
10240
[oracle@localhost]$

论坛徽章:
4
水瓶座
日期:2013-09-06 12:27:30摩羯座
日期:2013-09-28 14:07:46处女座
日期:2013-10-24 14:25:01酉鸡
日期:2014-04-07 11:54:15
2 [报告]
发表于 2013-04-23 18:20 |只看该作者
只影响当前的shell环境。

论坛徽章:
0
3 [报告]
发表于 2013-04-23 18:24 |只看该作者
linux_c_py_php 发表于 2013-04-23 18:20
只影响当前的shell环境。

想对所有session有效,怎么做?

论坛徽章:
4
水瓶座
日期:2013-09-06 12:27:30摩羯座
日期:2013-09-28 14:07:46处女座
日期:2013-10-24 14:25:01酉鸡
日期:2014-04-07 11:54:15
4 [报告]
发表于 2013-04-23 18:26 |只看该作者
/etc/security/limits.conf  

论坛徽章:
0
5 [报告]
发表于 2013-04-23 18:29 |只看该作者
linux_c_py_php 发表于 2013-04-23 18:26
/etc/security/limits.conf


[root@localhost ~]# cat /etc/security/limits.conf  
# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form:
#
#<domain>        <type>  <item>  <value>
#
#Where:
#<domain> can be:
#        - an user name
#        - a group name, with @group syntax
#        - the wildcard *, for default entry
#        - the wildcard %, can be also used with %group syntax,
#                 for maxlogin limit
#
#<type> can have the two values:
#        - "soft" for enforcing the soft limits
#        - "hard" for enforcing hard limits
#
#<item> can be one of the following:
#        - core - limits the core file size (KB)
#        - data - max data size (KB)
#        - fsize - maximum filesize (KB)
#        - memlock - max locked-in-memory address space (KB)
#        - nofile - max number of open files
#        - rss - max resident set size (KB)
#        - stack - max stack size (KB)
#        - cpu - max CPU time (MIN)
#        - nproc - max number of processes
#        - as - address space limit (KB)
#        - maxlogins - max number of logins for this user
#        - maxsyslogins - max number of logins on the system
#        - priority - the priority to run user process with
#        - locks - max number of file locks the user can hold
#        - sigpending - max number of pending signals
#        - msgqueue - max memory used by POSIX message queues (bytes)
#        - nice - max nice priority allowed to raise to values: [-20, 19]
#        - rtprio - max realtime priority
#
#<domain>      <type>  <item>         <value>
#

#*               soft    core            0
#*               hard    rss             10000
#@student        hard    nproc           20
#@faculty        soft    nproc           20
#@faculty        hard    nproc           50
#ftp             hard    nproc           0
#@student        -       maxlogins       4

# End of file
[root@localhost ~]#

怎么都是#注释?
如何改啊?

论坛徽章:
0
6 [报告]
发表于 2013-04-24 12:57 |只看该作者
注释好像写得比较清楚,里面的示例
*               soft    core            0
将所有用户的core文件的大小设置为0
@student        hard    nproc           20
student用户组最大进程数硬性限制为20
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP