Modifying the contents of a file and renaming it are two different types of modification. Take a look at the table in the linked screen, specifically at the highlighted part:
I find this confusing. I though you had to have both w and x for this to hold.
learn owns a file whose permissions are rwxr-xr-x; there’s no w here for others. What am I doing wrong?
None of this makes sense. I have no idea what you are referring to. Can you please show the exact file access modes (as far as that is possible) you are talking about for each of the files/directories in question?
One of the givens is that all files mentioned are in /home/dq.
Running ls -hl .. from /home/dq shows us that dq owns this directory and user dq has all permissions on it.
/home/dq$ ls -hl ..
total 8.0K
drwxr-xr-x 1 dq dq 4.0K May 12 15:33 dq
In the scenario set in question 4, there’s a file (in /home/dq) that learn owns.
The question asks if dq can rename this file. The ability to rename files is given by the directory’s permissions (i.e. /home/dq's permissions). The user dq has all permissions in this directory, including modification privileges, as given by w.
Now please refer to the underlined bit in the screenshot above.
I’m glad it helped. I’m curious to know if there was any specific piece of the puzzle that was missing for you, or if you really needed an overall explanation.
I had not realized that I was supposed to look at the dq file access modes. Your explanation helped me understand that I need to take a step back and check all the relevant file access mode definitions. In other words, I was just hyper focused on rwxr-xr-x and tried to answer everything by just looking at this particular piece of information. I hope this clarifies it. Thanks again!
Hello, Could you please help me understand how the answer for the below question is y?
Below question says that user dq can’t enter /home/learn. It implies that user dq doesn’t have execute permission on /home/learn. It doesn’t say whether user dq has read permission or not, correct ? So, do we just assume that user dq doesn’t have read permission on /home/learn and so cannot read/list contents of /home/learn ?
Could you tell me if I am able to utilize the assumptions given to the fullest to answer the questions?
Assumption 1 says that all directories in the path /home/dq have execution permissions for all users. It means that all users can enter the /home/dq directory. Until and unless we run ls -hl command in the CLI, it is not evident that all users have read permissions as well, correct ? or Is it safe to assume that user has read and execute permissions when someone says user has execution permissions?
Assumption 3 says Group ownership is the same as user ownership. How does this help in answering questions?