List of Important Unix/Linux Files and Their Permissions

linux file permissions techhyme

A file system is a logical collection of files on a partition or disk. A partition is a container for information and can span an entire hard drive if desired.

Also Read:

The permissions of a file are the first line of defense in the security of a Unix system. The basic building blocks of Unix/Linux permissions are the read, write, and execute permissions, which are described in the following table:

Permission Applied to directory Applied to other type of file
read (r) Grants the capability to read the contents of the directory or subdirectories. Grants the capability to view the file.
write (w) Grants the capability to create, modify, or remove files or subdirectories. Grants write permissions, allowing an authorized entity to modify the file, such as by adding text to a text file, or deleting the file.
execute (x) Grants the capability to enter the directory. Allows the user to “run” the program.

Like UNIX, Linux chooses to have a single hierarchical directory structure. Everything starts from the root directory, represented by /, and then expands into sub−directories instead of having so−called ‘drives’.

In the Windows environment, one may put one’s files almost anywhere: on C: drive, D: drive, E: drive etc. Such a file system is called a hierarchical structure and is managed by the programs themselves (program directories), not by the operating system.

On the other hand, Linux sorts directories descending from the root directory / according to their importance to the boot process.

Ensure the following files have been assigned proper permissions:

S.No. Filename User Group Permissions
1 /bin root root drwxr-xr-x
2 /etc root root drwxr-xr-x
3 /etc/aliases root root -rw-r–r–
4 /etc/default/login root root -rw——-
5 /etc/exports root root -rw-r–r–
6 /etc/hosts root root -rw-rw-r–
7 /etc/hosts.allow root root -rw——-
8 /etc/hosts.deny root root -rw——-
9 /etc/hosts.equiv root root -rw——-
10 /etc/hosts.lpd root root -rw——-
11 /etc/inetd.conf root root -rw——-
12 /etc/issue root root -rw-r–r–
13 /etc/login.access root root -rw——-
14 /etc/login.conf root root -rw——-
15 /etc/login.defs root root -rw——-
16 /etc/motd root root -rw-r–r–
17 /etc/mtab root root -rw-r–r–
18 /etc/netgroup root root -rw——-
19 /etc/passwd root root -rw-r–r–
20 /etc/rc.d root root drwx——
21 /etc/rc.local root root -rw——-
22 /etc/rc.sysinit root root -rw——-
23 /etc/sercuetty root root -rw——-
24 /etc/security root root -rw——-
25 /etc/services root root -rw-r–r–
26 /etc/shadow root root -r——–
27 /etc/ssh/ssh_host_key root root -rw——-
28 /etc/ssh/sshd_config root root -rw——-
29 /etc/ssh/ssh_host_dsa_key root root -rw——-
30 /etc/ssh/ssh_host_key root root -rw——-
31 /etc/ssh/ssh_host_rsa_key root root -rw——-
32 /etc/ttys root root -rw——-
33 /root root root drwx——
34 /sbin root root drwxr-xr-x
35 /tmp root root drwxrwxrwt
36 /usr/bin root root drwxr-xr-x
37 /usr/etc root root drwxr-xr-x
38 /usr/sbin root root drwxr-xr-x
39 /var/log root root drwxr-xr-x
40 /var/log/authlog* root root -rw——-
41 /var/log/boot* root root -rw——-
42 /var/log/cron* root root -rw——-
43 /var/log/dmesg root root -rw——-
44 /var/log/lastlog root root -rw——-
45 /var/log/maillog* root root -rw——-
46 /var/log/messages* root root -rw——-
47 /var/log/secure* root root -rw——-
48 /var/log/spooler* root root -rw——-
49 /var/log/syslog* root root -rw——-
50 /var/log/utmp* root utmp -rw-rw-r–
51 /var/log/wtmp* root utmp -rw-rw-r–
52 /var/log/xferlog root root -rw——-
53 /var/run root root drwxr-xr-x
54 /var/run/*.pid root
user
root
user
-rw-r–r–
55 /var/spool/cron root root drwx——
56 /var/spool/cron/crontabs/root root root -r——–
57 /var/spool/mail root mail drwxrwxr-x
58 /var/spool/mail/* user user -rw-rw—-
59 /var/tmp root root drwxrwxrwt

 

You may also like:

Related Posts