Sharing data: Difference between revisions

Jump to navigation Jump to search
m
Line 123: Line 123:
{{Command|prompt=[user@gra-login1]$|umask -S
{{Command|prompt=[user@gra-login1]$|umask -S
|result=u=rwx,g=rx,o=}}
|result=u=rwx,g=rx,o=}}
This means that, by default, new files that you create can be read, written and executed by yourself, they can be read and executed by members of the group of the file, and they cannot be access by other people. '''The <code>umask</code> only applies to new files. Changing the <code>umask</code> does not change the access permissions of existing files.'''  
This means that, by default, new files that you create can be read, written and executed by yourself, they can be read and executed by members of the group of the file, and they cannot be accessed by other people. '''The <code>umask</code> only applies to new files. Changing the <code>umask</code> does not change the access permissions of existing files.'''  


There may be reasons to define default permissions more permissive (for example, allow other people to read and execute files), or more restrictive (not allowing your group that read/execute files). Setting your own <code>umask</code> can be done either in a session, or in your <code>.bashrc</code> file, by calling the command
There may be reasons to define default permissions more permissive (for example, to allow other people to read and execute files), or more restrictive (not allowing your group to read or execute files). Setting your own <code>umask</code> can be done either in a session, or in your <code>.bashrc</code> file, by calling the command
{{Command|umask <value>}}
{{Command|umask <value>}}
where the <code><value></code> can take a number of octal values. Below is a table of useful options, depending on your use case :
where the <code><value></code> can take a number of octal values. Below is a table of useful options, depending on your use case :
Line 145: Line 145:


=== Change of the default <code>umask</code> on Cedar, Béluga and Niagara ===
=== Change of the default <code>umask</code> on Cedar, Béluga and Niagara ===
In the summer 2019, we discovered that the default <code>umask</code> was not the same on all of Compute Canada servers. In the fall of 2019, we will be changing the default <code>umask</code> on these three servers to match the one from Graham. The default <code>umask</code> will change as follow:  
In the summer 2019, we discovered that the default <code>umask</code> was not the same on all Compute Canada servers. In the fall of 2019, we will be changing the default <code>umask</code> on these three servers to match the one from Graham. The default <code>umask</code> will change as follows:  
{| class="wikitable"
{| class="wikitable"
|-
|-
Bureaucrats, cc_docs_admin, cc_staff
2,879

edits

Navigation menu