Booser Empowering your life

21Nov/111

Umask command

The umask value is just that, a mask. It masks out the permissions you don’t want to give.The umask value is subtracted from the full permission set for an object. The full permission for a file is mode 666 (read/write permission for all), but for a directory it’s 777 (read/write/execute permission for all).

umask command shows and sets the default permissions:

root@mypowerserver:~# umask 0022

Thus, in the example, the file starts out with permissions 666, and the umask of 022 is applied, leaving a file permission of 644. The umask value is normally set in the /etc/profile startup file.

Link To This Page
1. Click inside the codebox
2. Right-Click then Copy
3. Paste the HTML code into your webpage
codebox

Incoming search terms: