Ls: cannot open directory /home: Permission denied If one changed the ownership of /home to remove read permission for non-owners, I could not list the content of /home any longer: sudo chmod o-r ls -ld /homeĭrwxr-x-x 2 root root 40 Dez 17 21:17 ls -l /home Ls: cannot open directory /home/root: Permission denied However, I cannot list the content of /home/root, since I'm not the owner and nobody but the owner has read permissions on that directory: ls /home/root I can also list the content of /home/david, since I'm its owner and the owner has read permission. I can list the content of /home/guest for the same reason. ĭrwxr-xr-x 1 guest guest 836 Sep 4 20:58 guestĭrwxr-x- 1 david users 4,2K Dec 14 22:07 davidĭrwx- 1 root root 614 Nov 10 12:42 rootĪs you can see, I, david, can list the content of /home even though I am not its owner, since everybody can read it (see the permission mask in front of the. The mechanism for SSH/SFTP access is the same as with local tools, since the SSH/SFTP server spawns a subprocess for each session and changes the ownership of the subprocess to the respective user, as soon as they're authenticated successfully.Ĭonsider the following example: ls -la /homeĭrwxr-xr-x 23 root root 4,0K Dec 17 11:09. This includes directory entries, that this user cannot open/read. Only the permission of the (from your point of view) parent directories determine, whether its content can be listed by a particular user.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |