免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
论坛 操作系统 BSD 请教
12下一页
最近访问板块 发新帖
查看: 2342 | 回复: 11
打印 上一主题 下一主题

请教 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-02-10 11:22 |只看该作者 |倒序浏览
chflags有意义吗?

论坛徽章:
0
2 [报告]
发表于 2003-02-10 11:42 |只看该作者

请教

有意义啊!为何如此说?

论坛徽章:
0
3 [报告]
发表于 2003-02-10 12:33 |只看该作者

请教

[quote]原帖由 "duran"]chflags有意义吗?[/quote 发表:

可以帮文件加锁,防止那些烂用户乱删文件。

论坛徽章:
0
4 [报告]
发表于 2003-02-10 12:37 |只看该作者

请教

把/sbin /bin几个重要的文件夹打上schg标记,再把securelevel提到2级以上基本上可以预防给人种rootkit。

论坛徽章:
0
5 [报告]
发表于 2003-02-10 12:39 |只看该作者

请教

[quote]原帖由 "MaxBSD"]把/sbin /bin几个重要的文件夹打上schg标记,再把securelevel提到2级以上基本上可以预防给人种rootkit。[/quote 发表:

MaxBSD,

听说securelevel提升后是不是不能降下来的啊?

论坛徽章:
0
6 [报告]
发表于 2003-02-10 12:40 |只看该作者

请教

原帖由 "ihweb" 发表:

MaxBSD,

听说securelevel提升后是不是不能降下来的啊?


四的,四的。能降下来还有什么安全可言啊。

论坛徽章:
0
7 [报告]
发表于 2003-02-10 12:43 |只看该作者

请教

原帖由 "MaxBSD" 发表:


四的,四的。能降下来还有什么安全可言啊。


哦?!如果我重新启动后把securelevel 降低还可以吗?

(好象文章没说过。)

论坛徽章:
0
8 [报告]
发表于 2003-02-10 12:46 |只看该作者

请教

原帖由 "ihweb" 发表:


哦?!如果我重新启动后把securelevel 降低还可以吗?

(好象文章没说过。)


自己试试。 ;-)

还有一个方法可以把Apache的整个HTML文件目录弄成Read-only,即使Apache给攻陷了都没法删/改首页。但又可以正常FTP修改网页文件。

论坛徽章:
0
9 [报告]
发表于 2003-02-10 12:50 |只看该作者

请教

原帖由 "MaxBSD" 发表:


自己试试。 ;-)

还有一个方法可以把Apache的整个HTML文件目录弄成Read-only,即使Apache给攻陷了都没法删/改首页。但又可以正常FTP修改网页文件。


服务器在正常用啊,不敢做测试啊。

论坛徽章:
0
10 [报告]
发表于 2003-02-10 17:07 |只看该作者

请教

原帖由 "ihweb" 发表:


哦?!如果我重新启动后把securelevel 降低还可以吗?

(好象文章没说过。)


瞎说!!!

$ man chflags
Formatting page, please wait...Done.
CHFLAGS(1)              FreeBSD General Commands Manual             CHFLAGS(1)

NAME
     chflags - change file flags

SYNOPSIS
     chflags [-R [-H | -L | -P]] flags file ...

DESCRIPTION
     The chflags utility modifies the file flags of the listed files as speci­
     fied by the flags operand.

     The options are as follows:

     -H      If the -R option is specified, symbolic links on the command line
             are followed.  (Symbolic links encountered in the tree traversal
             are not followed.)

     -L      If the -R option is specified, all symbolic links are followed.

     -P      If the -R option is specified, no symbolic links are followed.
             This is the default.

     -R      Change the file flags for the file hierarchies rooted in the
             files instead of just the files themselves.

     The flags are specified as an octal number or a comma separated list of
     keywords.  The following keywords are currently defined:

           arch    set the archived flag (super-user only)
           opaque  set the opaque flag (owner or super-user only)
           nodump  set the nodump flag (owner or super-user only)
           sappnd  set the system append-only flag (super-user only)
           schg    set the system immutable flag (super-user only)
           sunlnk  set the system undeletable flag (super-user only)
           uappnd  set the user append-only flag (owner or super-user only)
           uchg    set the user immutable flag (owner or super-user only)
           uunlnk  set the user undeletable flag (owner or super-user only)
           archived, sappend, schange, simmutable, uappend, uchange,
                   uimmutable, sunlink, uunlink
                   aliases for the above

    Putting the letters ``no'' before an option causes the flag to be turned
     off.  For example:

           nouchg  the immutable bit should be cleared
     Symbolic links do not have flags, so unless the -H or -L option is set,
     chflags on a symbolic link always succeeds and has no effect.  The -H, -L
     and -P options are ignored unless the -R option is specified.  In addi­
     tion, these options override each other and the command's actions are
     determined by the last one specified.

     You can use "ls -lo" to see the flags of existing files.

DIAGNOSTICS
     The chflags utility exits 0 on success, and >;0 if an error occurs.

SEE ALSO
     ls(1), chflags(2), stat(2), fts(3), symlink(7)

HISTORY
     The chflags command first appeared in 4.4BSD.

FreeBSD 4.7                       May 2, 1995                      FreeBSD 4.7
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP