中国IT动力,最新最全的IT技术教程
最新100篇 | 推荐100篇 | 专题100篇 | 排行榜 | 搜索 | 在线API文档
首 页 | 程序开发 | 操作系统 | 软件应用 | 图形图象 | 网络应用 | 精文荟萃 | 教育认证 | 硬件维护 | 未整理篇 | 站长教程
ASP JS PHP工程 ASP.NET 网站建设 UML J2EESUN .NET VC VB VFP 网络维护 数据库 DB2 SQL2000 Oracle Mysql
服务器 Win2000 Office C DreamWeaver FireWorks Flash PhotoShop 上网宝典 CorelDraw 协议大全 网络安全 微软认证
硬件维护  CPU  主板  硬盘  内存  显卡  显示器  键盘鼠标  声卡音箱  打印机  机箱电源  BIOS  网卡  C#  Java  Delphi  vs.net2005
  当前位置:> 操作系统 > Linux > Linux综合
在 linux 下修改用户的 limitation, (和用户的登录Shell相关)
作者:未知 时间:2005-09-13 22:20 出处:Blog.ChinaUnix.net 责编:chinaitpower
              摘要:在 linux 下修改用户的 limitation, (和用户的登录Shell相关)
在 linux 下修改用户的 limitation, (和用户的登录Shell相关)

在 Linux 下某用户下能否产生 core 文件,产生的 core file size 的等限制,是可以通过修改配置文件
/etc/security/limits.conf 文件里的配置来加以修改。有的时候,系统会在 /etc/profile 之类的文件中
作出全局的配置。例如:  在 SUSE 下的 /etc/profile 经常有如下的缺省设置:
    ulimit -Sc 0                # don't create core files
    ulimit -Sd $(ulimit -Hd)
    ulimit -Ss $(ulimit -Hs)
    ulimit -Sm $(ulimit -Hm)
如果希望产生 core,别忘了把这里的设置注释掉。


按照文件前部的说明,可以在文件中添加类似这样的行:

username soft core scorefilesize
username hard core hcorefilesize


@group soft core scorefilesize
@group hard core hcorefilesize

分别对用户'username'和组'groupname'设置能否产生 core,产生的 core file size 的限制
占位符scorefilesizehcorefilesize需要分别填写

请详细阅读文件 /etc/security/limits.conf 的注释部分

# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form:
#
#Where:
# 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
#
# can have the two values:
# - "soft" for enforcing the soft limits
# - "hard" for enforcing hard limits
#
# 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
# - maxlogins - max number of logins for this user
# - priority - the priority to run user process with
# - locks - max number of file locks the user can hold
#
#
#



关闭本页
 
首页 | 投资与合作 | 服务条款 | 隐私政策 | 收藏本站 | 设为首页 | 新用户注册 | 免责声明 | 使用帮助
Copyright ©2005-2008 chinaitpower.com All rights reserved. www.chinaitpower.com 版权所有