DEV Community

loading...

Discussion on: Linux Basics

Collapse
chanduthedev profile image
chanduthedev

Permission values are 1,2 and 4 as shown below and why not 3 after 1 and 2?
4 → read permission
2 → write permission
1 → execute permission
This is basing on the power of two, starting from zero.

2*0 = 1 → execute permission
2
1 = 2 → write permission
2
*2 = 4 → read permission
Due to this logic, there is 4 and not 3.

This will help to remember permission values easily.

Collapse
rudrakshi99 profile image
Rudrakshi Author

Thanks for sharing this!