Linux file permissions

On my journey to become Linux admin I am having to overcome several knowledge gaps. In this matter the only way to master something is to repeat it a thousand times so.

First, is theory:

Usage of ls -l (long list) -a (do not hide elements) returns a list of the current directories and files, along with explicit permission settings for that file or directory.

total [NUMBER]
[PERMISSIONS][LINKS][OWNER][GROUP][FILE SIZE][MODIFICATION DATE] [ITEM]

  • d for directory
  • rwx means read, write and execute permissions for the owner
  • r-x means read and execute permissions for the group
  • r-x means read and execute permissions for all others

total 904
drwxr-xr-x 109 root root 4096 Mar 9 13:25 .
drwxr-xr-x 23 root root 4096 Mar 9 11:06 ..
drwxr-xr-x 3 root root 4096 Jul 25 2018 acpi
-rw-r–r– 1 root root 3028 Jul 25 2018 adduser.conf
drwxr-xr-x 2 root root 4096 Mar 3 13:03 alternatives
drwxr-xr-x 8 root root 4096 Mar 2 18:29 apache2
drwxr-xr-x 3 root root 4096 Jul 25 2018 apm
drwxr-xr-x 3 root root 4096 Mar 2 17:04 apparmor
drwxr-xr-x 9 root root 4096 Mar 2 17:56 apparmor.d
drwxr-xr-x 3 root root 4096 Mar 2 17:04 apport
drwxr-xr-x 6 root root 4096 Mar 2 18:50 apt
-rw-r—– 1 root daemon 144 Feb 20 2018 at.deny
-rw-r–r– 1 root root 2319 Apr 4 2018 bash.bashrc
-rw-r–r– 1 root root 45 Apr 2 2018 bash_completion
drwxr-xr-x 2 root root 4096 Mar 2 17:05 bash_completion.d

Now , practice, practice and more practice

Be the first to comment

Leave a Reply

Your email address will not be published.


*