ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 目录文件有写权限 危险

目录文件有写权限 危险

原创 Linux操作系统 作者:psufnxk2000 时间:2013-12-17 20:07:53 0 删除 编辑
目录文件有写权限是很危险的: 因为目录有写权限则意味着别的用户可以修改目录的内容。
 
例如:
 
[ogg@localhost oracle]$ whoami
ogg
[ogg@localhost oracle]$ ll /home/oracle


-rwxr-xr-x 1 oracle oinstall   2110 Sep 25 20:25 aa.sh     --别的用户对于这个文件不具有写权限


[ogg@localhost oracle]$ ll /home
total 28
drwx------  3 dmdba  dinstall 4096 Jun  5  2013 dmdba
drwx------ 20 iqdb   oinstall 4096 Aug 11 00:13 iqdb
drwx------  3 ogg    ogg      4096 Jan 16  2013 ogg
drwxrwxrwx 22 oracle oinstall 4096 Dec 17 16:15 oracle
drwx------  3 test   test     4096 Dec 17 13:07 test
[ogg@localhost oracle]$ cd /home/oracle
[ogg@localhost oracle]$ vi aa.sh 


set serveroutput on;
set feedback off;
set linesize 120;


加入
oooooo
之后  :wq!
"aa.sh" 63L, 2117C written
[ogg@localhost oracle]$ cat aa.sh 
set serveroutput on;
set feedback off;
set linesize 120;
oooooo
[ogg@localhost oracle]$ 




[ogg@localhost oracle]$ ll aa.sh
-rwxr-xr-x 1 ogg ogg 2117 Dec 17 16:21 aa.sh    --用户的属主发生了变化 

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/25099483/viewspace-1063508/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2011-05-31

  • 博文量
    215
  • 访问量
    700286