Permission problem

Screen Link:

How to solve the following:

  • Third scenario. User dq can’t enter /home/learn , but has rwx permissions for all the content in /home/learn .

  • Question 5. Can user dq read/list the contents of the home directory of learn ?

Since, dq can’t enter /home/learn, this means that dq doesn’t have the execute (x) permission. but what’s next?

1 Like

I would first recommend that you check out the hints provided by them for this exercise.

1 Like

What is necessary permission-wise in order to list the contents of a directory?

Read permission is required to list the contents of the directory. However, It isn’t mentioned anywhere that the user dq have read permission for directory /home/learn. So how can I arrive at the answer?

1 Like

I can understand the slight confusion here. It should perhaps be clarified a bit more in the content as well.

The concept is that if you can’t enter the directory then you can’t view the contents of the directory either. Because you can’t access those items within the directory regardless of whatever permissions those items might have.


Thanks for clarifying and consider updating the content as well.

I found these rules helpful

Directory permissions

  • Permissions for directories aren’t exactly the same as they are for files. Here are some typical permissions required on directories:

  • Execute permission is required for a user to cd into a directory.

  • Read permission is required for a user to use a command such as ls to view the files contained in a directory.

  • Execute-only permission allows a user to access the files in a directory as long as the user knows the names of the files in the directory, and the user is allowed to read the files.

  • Write permission allows the user to create, delete, or modify any files or subdirectories, even if the file or subdirectory is owned by another user.