Skip to main content
IBM 
ShopSupportDownloads
IBM HomeProductsConsultingIndustriesNewsAbout IBM
IBM : developerWorks : Linux : Education - Tutorials
LPI certification 101 exam prep, Part 3
ZIPPDF (letter)PDF (A4)e-mail
Main menuSection menuFeedbackPreviousNext
3. The Linux permissions model
  


The umask, continued page 14 of 23


To make new files more secure by default, you can change the umask setting:


$ umask 0077

This umask will make sure that the group and others will have absolutely no permissions for any newly-created files. So, how does the umask work? Unlike "regular" permissions on files, the umask specifies which permissions should be turned off. Let's consult our mode-to-digit mapping table so that we can understand what a umask of 0077 means:

modedigit
rwx7
rw-6
r-x5
r--4
-wx3
-w-2
--x1
---0

Using our table, the last three digits of 0077 expand to ---rwxrwx. Now, remember that the umask tells the system which permissions to disable. Putting two and two together, we can see that all "group" and "other" permissions will be turned off, while "user" permissions will remain untouched.


Main menuSection menuFeedbackPreviousNext
PrivacyLegalContact