User Tools

Site Tools


Linux Permissions Introduction


For someone like me who comes from a Windows background, Linux permissions were somewhat confusing, so here is a little reminder because from time to time, I do forget (okay, all the time).

First the structure, I have an example file that I will use, to show this file and its permissions, from a command line enter:

  ls -al
  The output is:
  "-rw-r--r-- 1 pi pi 4452 Jul 25 18:01"

The part we are interest in is at the start of the line:

  A 10 character section that can be split up as:
  "-" This denotes file or directory "-" = File, "d" = Directory

Then we have three sets of three characters, and these are the different permissions for:

  "rw-" - Owner
  "r--" - Group
  "r--" - Other


  r is for read, w is for write and x is for execute.

So for our example:

  "-rw-r--r-- 1 pi pi 4452 Jul 25 18:01"
  "-" means its a file
  "rw-" Owner has read + write permissions
  "r--" Group has read only
  "r--" Other has read only.

Who is the Owner and Group?

  "-rw-r--r-- 1 pi pi 4452 Jul 25 18:01"
  In this example, pi is the owner and they are a member of the pi group

linux_permissions_introduction.txt · Last modified: 2023/03/09 22:35 by