I type the umask command in linux shell and it returns 002 as output. I know what for umask command used. But what 002 represents. please help me
2 Answers
It shows the default permission levels by which a file will be created.
Subtracting umask from base permission would give you actual file permissions.
All the files will be created with 664 (666-002) permissions and dir with 775 (777-002) permissions.
-
-
2The order is rwx (read-write-execute), and the bitmask is defined as r=4, w=2, x=1, so 002 equals w only. Commented Oct 14, 2013 at 7:35
write. Hence, files will not be writable byothersby default.