No. The permissions that you see can be split into four components: type of entry, owner permissions, group permissions, and "all" permissions; "all" simply refers to anyone who is neither the owner or a member of the group. What the permissions mean depend on whether the entry is a file or a directory. A more thorough description of how permissions work is here.
So, for this example:
$ ls -dl /etc /etc/passwd /etc/shadow
drwxr-xr-x 58 root root 4096 Feb 13 19:08 /etc
-rw-r--r-- 1 root root 1887 Oct 11 21:49 /etc/passwd
-rw-r----- 1 root root 970 Oct 11 21:49 /etc/shadow
For /etc
:
d
: the entry is a directory.
rwx
: the owner of the directory (root
) has full permissions to view and modify (add/delete/rename) file entries, and change to ("cd
") this directory.
r-x
: members of the group (also called root
, but is not the same as the user called root
) have permissions to view file entries and change to ("cd
") this directory.
r-x
: everyone else has permissions to view file entries and change to ("cd
") this directory.
Note that having permission to read a directory does not mean that you can read the contents of individual files: that is what file permissions are for.
Individual files work in a similar way, but the permissions refer to reading, writing and executing the file itself.
For /etc/passwd
:
-
: the entry is a regular file.
rw-
: the owner (root
) can read and write to this file, but not run it directly from the command line.
r--
: members of the group (root
) can only read this file.
r--
: everyone else can read this file.
Originally the /etc/passwd
file did have (encrypted) passwords in it, but that was judged to be a security risk so the passwords were moved to a "shadow" copy of the password file called /etc/shadow
. It is only accessible by the root
user and group (-rw-r-----
): regular users cannot view it.
/etc/passwd
? Just 1) make a backup as root, 2) start two session 3) delete as a normal user the file.