Chinaunix

标题: 请教 [打印本页]

作者: duran    时间: 2003-02-10 11:22
标题: 请教
chflags有意义吗?
作者: wormcode    时间: 2003-02-10 11:42
标题: 请教
有意义啊!为何如此说?
作者: ihweb    时间: 2003-02-10 12:33
标题: 请教
[quote]原帖由 "duran"]chflags有意义吗?[/quote 发表:

可以帮文件加锁,防止那些烂用户乱删文件。
作者: MaxBSD    时间: 2003-02-10 12:37
标题: 请教
把/sbin /bin几个重要的文件夹打上schg标记,再把securelevel提到2级以上基本上可以预防给人种rootkit。
作者: ihweb    时间: 2003-02-10 12:39
标题: 请教
[quote]原帖由 "MaxBSD"]把/sbin /bin几个重要的文件夹打上schg标记,再把securelevel提到2级以上基本上可以预防给人种rootkit。[/quote 发表:

MaxBSD,

听说securelevel提升后是不是不能降下来的啊?
作者: MaxBSD    时间: 2003-02-10 12:40
标题: 请教
原帖由 "ihweb" 发表:

MaxBSD,

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


四的,四的。能降下来还有什么安全可言啊。
作者: ihweb    时间: 2003-02-10 12:43
标题: 请教
原帖由 "MaxBSD" 发表:


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


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

(好象文章没说过。)
作者: MaxBSD    时间: 2003-02-10 12:46
标题: 请教
原帖由 "ihweb" 发表:


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

(好象文章没说过。)


自己试试。 ;-)

还有一个方法可以把Apache的整个HTML文件目录弄成Read-only,即使Apache给攻陷了都没法删/改首页。但又可以正常FTP修改网页文件。
作者: ihweb    时间: 2003-02-10 12:50
标题: 请教
原帖由 "MaxBSD" 发表:


自己试试。 ;-)

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


服务器在正常用啊,不敢做测试啊。
作者: kinux    时间: 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
作者: Fun-FreeBSD    时间: 2003-02-10 17:14
提示: 作者被禁止或删除 内容自动屏蔽
作者: ihweb    时间: 2003-02-10 18:12
标题: 请教
原帖由 "Fun-FreeBSD" 发表:
不重新起动,只能提升securelevel, 不能降低securelevel

要想降低securelevel,只能修改securelevel,然后重起


明白啦!!!




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2