From f0da7a823d5f0162bb76f0302c2e3079e8cdfae6 Mon Sep 17 00:00:00 2001 From: newrain001 Date: Sat, 24 Feb 2024 16:23:17 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20'os/check1.sh'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- os/check1.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/check1.sh b/os/check1.sh index 14c1910..78d0ffc 100644 --- a/os/check1.sh +++ b/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 # 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目录的权限是否允许所有用户创建文件或子目录,且新文件继承属组 check_command "[ \$(stat -c '%a' /opt/myfile) = '2777' ]" 8