更新 'os/check1.sh'

master
newrain001 7 months ago
parent 30707ce7be
commit f0da7a823d
  1. 2
      os/check1.sh

@ -28,7 +28,7 @@ check_command "[ \$(stat -c '%U' /opt/world.txt) = 'jack' ] && [ \$(stat -c '%G'
check_command "[ \$(stat -c '%A' /opt/world.txt) = '-rwxrw-r--' ]" 6 check_command "[ \$(stat -c '%A' /opt/world.txt) = '-rwxrw-r--' ]" 6
# 7. 检查/opt/myfile目录的属组是否为hr,并且递归设置 # 7. 检查/opt/myfile目录的属组是否为hr,并且递归设置
check_command "[ \$(stat -c '%G' /opt/myfile) = 'hr' ] && [ \$(find /opt/myfile -not -group hr | wc -l) -eq 1 ]" 7 check_command "[ \$(stat -c '%G' /opt/myfile) = 'hr' ] && [ \$(find /opt/myfile -not -group hr | wc -l) -eq 0 ]" 7
# 8. 检查/opt/myfile目录的权限是否允许所有用户创建文件或子目录,且新文件继承属组 # 8. 检查/opt/myfile目录的权限是否允许所有用户创建文件或子目录,且新文件继承属组
check_command "[ \$(stat -c '%a' /opt/myfile) = '2777' ]" 8 check_command "[ \$(stat -c '%a' /opt/myfile) = '2777' ]" 8

Loading…
Cancel
Save