Friday 18 May 2018

Unix File system Permissions

Hey Guys,

Today i will explain about the Linux file permissions that i learned.

So, In short it consists of three access permissions for below list

1. user/owner(u)
2. group(g)
3. outside world(o)

and permissions are

1. read(r)
2. write(w)
3.execute(x)

So, when you do ls -l , it displays the list of files under directory . it will be displayed like filename with -drwx---

Lets expand above structure:
  • -: "regular" file, created with any program which can write a file
  • b: block special file, typically disk or partition devices, can be created with mknod
  • c: character special file, can also be created with mknod (see /dev for examples)
  • d: directory, can be created with mkdir
  • l: symbolic link, can be created with ln -s
  • p: named pipe, can be created with mkfifo
  • s: socket, can be created with nc -U
  • Ddoor, created by some server processes on Solaris/openindiana.

Here is the linux file permission overview. image from stack exchange
UNIX file permissions

Numerical permissions

#Permissionrwx
7read, write and executerwx
6read and writerw-
5read and executer-x
4read onlyr--
3write and execute-wx
2write only-w-
1execute only--x
0none---
Unix Permission Calculator :

http://permissions-calculator.org/

No comments:

Post a Comment