Setting Default Permissions

ubuntuBy default Ubuntu sets umask as 022.  This article describes the process for changing this setting for individuals, and all users.


All Users

From a terminal session, run the following command to edit the login.defs file.

$ sudo vi /etc/login.defs

 You can now edit the following line and change it to what you want.

UMASK 022

For example, you might want to change the UMASK value to 007, to allow multiple members of the same group read/write access to newly created files and directories, but lock out all other users.

 

Individuals

You can set the umask value for your individual local user account by editing ~/.bashrc

$ sudo vi ~/.bashrc

Search for an existing entry for umask, otherwise add a new line at the end of the file.

umask 022

 

Thanks for visiting.