Unix 파일 보호 명령

Unix 파일 보호 명령
 ~/UnixCourse
You should be able to add and remove files from the directory, access files within the directory whose names you already know, and look through the directory via ls to see what files are in there. No one else should be able to do any of these things.
(This is a good setting for directories where you will keep assignments for various courses. After this assignment, your ~/UnixCourse directory should always be set this way.)

~/UnixCourse/fileAsst
You should be able to add and remove files from the directory, access files within the directory whose names you already know, and look through the directory via ls to see what files are in there. People in your group should be able to do ls and to access files, but not add/remove files from the directory. People outside your group should be able to do none of these things.
(Actually, no one but you will really have access to this directory because it’s inside ~/UnixCourse and, if you’ve done the prior step correctly, they can’t get inside there to get to fileAsst. But, for the sake of this exercise, we’ll ignore that fact.)

~/UnixCourse/fileAsst/Empire
You should be able to add and remove files from the directory, access files within the directory whose names you already know, and look through the directory via ls. Everyone else should be able to use ls but have no other privileges.

~/UnixCourse/fileAsst/Alliance
You should be able to add and remove files from the directory, access files within the directory whose names you already know, and look through the directory via ls. Everyone else should be able to access files in the directory for which they already know the names, but have no other privileges.

~/UnixCourse/fileAsst/Empire/darth.txt
Everyone should be able to read and write to this file.

~/UnixCourse/fileAsst/Alliance/r2d2.txt
We will pretend, for the sake of this assignment, that this file contains an executable program. You should be able to read and write to this file. You and members of your group should be able to execute it. People other than you have no other privileges.

이것이 이 문제에 대한 나의 해결책입니다:

 chmod 700 UnixCourse
 chmod 740 fileAsst
 chmod 744 ~/UnixCourse/fileAsst/Empire
 chmod 666~/UnixCourse/fileAsst/Alliance
 chmod 670~/UnixCourse/fileAsst/Empire/darth.txt
 chmod 660~/UnixCourse/fileAsst/Alliance/r2d2.txt

unixcourse에 대한 보호는 올바르지만 fileAsst에 대한 보호는 내 그룹 구성원의 액세스를 허용하지 않지만 그래야 한다는 오류가 계속 발생합니다. u(사용자), g(그룹), o(기타), a(모두)별로 권한을 추가하고 - 권한을 제거합니다. 4는 읽기, 2는 쓰기, 1은 실행입니다.

내가 무엇을 놓치고 있나요?

미리 감사드립니다~!

답변1

fileAsst권한이 740인 디렉터리입니다. 즉, 그룹 구성원(소유자 제외)은 콘텐츠를 읽을 수 있지만 현재 디렉터리를 fileAsst만들 수는 없습니다 . fileAsst이로 인해 에 있는 파일을 나열할 수 있지만 fileAsst해당 파일의 세부 정보를 볼 수 없는 이상한 결과가 발생합니다.

fileAsst집에서 만들고 파일 passwd을 복사한 후 이러한 권한을 부여했습니다. 그러므로:

$ ls -l fileAsst/
ls: cannot access 'fileAsst/passwd': Permission denied
total 0
-????????? ? ? ? ?            ? passwd

fileAsst최소한 실행 권한(750 또는 770)을 부여 해야 합니다 .

관련 정보