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 fileb: block special file, typically disk or partition devices, can be created withmknodc: character special file, can also be created withmknod(see/devfor examples)d: directory, can be created withmkdirl: symbolic link, can be created withln -sp: named pipe, can be created withmkfifos: socket, can be created withnc -UD: door, created by some server processes on Solaris/openindiana.
Here is the linux file permission overview. image from stack exchange

Numerical permissions
| # | Permission | rwx |
|---|---|---|
| 7 | read, write and execute | rwx |
| 6 | read and write | rw- |
| 5 | read and execute | r-x |
| 4 | read only | r-- |
| 3 | write and execute | -wx |
| 2 | write only | -w- |
| 1 | execute only | --x |
| 0 | none | --- |
Unix Permission Calculator :
http://permissions-calculator.org/
No comments:
Post a Comment