By default, the value for umask is 0022 result into default directory permissions are 755 and default file permissions are 644.
How to calculate umask value?
The base permissions for directories are 0777 (drwxrwxrwx) and for files they are 0666 (-rw-rw-rw-).
To calculate directory permission for 022 umask (root user):
Default Permissions: 666
Subtract umask value: 022 (-)
Allowed Permissions: 644
To calculate file permission for 022 (root user):
Default Permissions: 777
Subtract umask value: 022 (-)
Allowed Permissions: 755
How to change umask value?
umask value is mentioned in the file /etc/bashrc or ~/.bashrc. In this file, Append/modify following line to setup a new umask:
umask 022










Recent Comments