I need some clarity on the file/directory persmission topic. For the question given below I have not understood the answers provided by DQ.
Second scenario: User learn owns a file whose permissions are rwxr-xr-x . Question 3: Can dq modify the contents of this file? Answer is No Question 4: Can dq rename this file? Answer is Yes
Here in this scenario if my understanding is correct, we have two users dq and learn. Now inside the learn directory we have a file with the permissions rwxr-xr-x. If we break it down then it’s as follows:
rwx : permission for the user which is learn but not for dq
r-x : permission for the group which is /home. Here my understanding is both the users dq and learn belongs to same group /home and hence these access are applicable to dq aswell.
r-x : the permission for the group other than /home as per understanding.
The answer to first question is No becasue the user though dq belongs to same group, the group permission is only r-x.
For the second question’s answer to be Yes, the directory where the file is saved, which is in this case learn should have write permission to group. But this is not clear from the given scenario.
Please throw some light on this.