pavement

Umask

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
Line 2: Line 2:
  
 
  umask xxx
 
  umask xxx
where xxx is the inverse of the [[numeric_permissions]] that you want the file to have. To clarify: you have to subtract your [[umask]] value from 777 to get the umask value that will vige you the permissions you want.
+
where xxx is the inverse of the [[numeric_permissions]] that you want the file to have. To clarify: you have to subtract your [[umask]] value from 777 to get the umask value that will give you the permissions you want.
  
 
If you set a umask of                          027
 
If you set a umask of                          027

Revision as of 22:34, 1 July 2005

umask defines what permissions files are given when you create them. The umask is set in your .profile (or shell profile, like .cshrc or .bashrc, etc) and will be set with the simple line (just like you would give on the command line):

umask xxx

where xxx is the inverse of the numeric_permissions that you want the file to have. To clarify: you have to subtract your umask value from 777 to get the umask value that will give you the permissions you want.

If you set a umask of 027 and then subtract it from 777 means your files have a default permission of 750

Which means your default files will be created with -rwxr-x--- permissions.

Personal tools