I am confused about the 2nd part of this question (see photo below). As user and group permissions are contradicting. User doesn't have the execute permission but the group has. Can user also execute as user is the part of the group? or are all permissions are independent of each other?
A system has the following ordinary users and groups (and no others):
User Groups alice staff, users, course bob admin, users carol admin, users, course dave staff, users eve course, users fred admin, staff, users Consider the following directory listing:
-r-x--xr-- 1 alice course 138856 Apr 27 10:46 file1 ----rwxr-x 1 dave staff 2190232 Apr 27 11:49 file2 ---xr--r-x 1 carol course 24000 Apr 27 09:14 file3.sh -rwx-----x 1 fred admin 123456 Apr 27 11:50 file4.txt
and the following command output:
$ file file* filel: ASCII text file2: POSIX shell script, ASCII text executable file3.sh: POSIX shell script, ASCII text executable file4.txt: ELF 64-bit ISB executable, ×86-64
List all of the users who are allowed to do the following.
Read from file1
Alice, bob, dave, fred (+2)
Write to file2
Alice, fred (+1)
Dave is owner who cannot write, but he is also in the group that can write. ????Confused here As far as i understand it, you can only have one set of permissions per person. So since dave is the owner, they are only affected by the 'owner' permissions. Similarly, a group member's permissions are unaffected by what permissions the owner has
dave
can write or not, and you will find that they can not, even though they are part of thestaff
group. An answer would explain why this is the case. – Kusalananda Nov 11 '22 at 08:30