Calculation linux umask

1. umask for permission to set the default new file or directory

 View the current value of umask command: umask -p

 Calculated to create the file permissions: If umask value of each digit is even, by using 666-bit value minus the umask to

  If a bit or all bits of the value is odd, bit 666 will have the number of bits corresponding to the Save umask value +1.

 Create a calculated permission dir: Direct umask value to 777 bits by reduction, regardless of the number of the parity bits.

2. The digital value corresponding to 7 digits, when calculating the file permissions 6 according to calculation, the calculation can be calculated as usual dir.

 

Guess you like

Origin www.cnblogs.com/quzq/p/11787235.html