Debian主目录权限被重新设置

Debian上每天挤一次,一个特定用户的主目录权限被重新设置为chmod 700和chown root:root。 每天我都必须手动设置权限才能正确login。 任何人都知道这是从哪里来的?

安装audit包:

 Name : audit Arch : x86_64 Version : 1.7.13 Release : 2.el5 Size : 898 k Repo : installed Summary : User space tools for 2.6 kernel auditing URL : http://people.redhat.com/sgrubb/audit/ License : GPL Description: The audit package contains the user space utilities for : storing and searching the audit records generate by : the audit subsystem in the Linux 2.6 kernel. 

/home/user上设置一个监视以进行审计:

 # auditctl -w /home/user/ -p war 

权限更改后,您可以通过运行找出是谁执行的:

 ausearch -f /home/user/ 

示例输出:

 time->Fri Sep 7 01:13:03 2012 type=PATH msg=audit(1346955183.879:429844): item=0 name="/home/user/" inode=849480 dev=03:03 mode=040700 ouid=0 ogid=500 rdev=00:00 type=CWD msg=audit(1346955183.879:429844): cwd="/root" type=SYSCALL msg=audit(1346955183.879:429844): arch=c000003e syscall=90 success=yes exit=0 a0=1303b0b0 a1=1e8 a2=1e8 a3=1e8 items=1 ppid=17909 pid=25018 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts0 ses=4294967295 comm="chmod" exe="/bin/chmod" key=(null)