Difference between revisions of "Tips: Custom file permissions at creation"

(Replaced content with "{{color box |lightsteelblue|Template:Stub This is a stub page and needs expansion}} This page provides information on how to create files with group read permissions....")
(Tag: Replaced)
Line 1: Line 1:
 
{{color box |lightsteelblue|[[:Template:Stub]] This is a stub page and needs expansion}}
 
{{color box |lightsteelblue|[[:Template:Stub]] This is a stub page and needs expansion}}
This page provides information on how to create files with group read permissions.
+
This page provides information on how to create files with group read permissions at NCI.
  
 +
By default, when you create a file under /short of /g/data, the file will be readable by you and the group owning the file. So you don't need to change anything then. But there are a few cases where the default behaviour is different and you may want to change it.
 
== PBS logs ==
 
== PBS logs ==
By default, all log files from PBS are only open to the user owning of the file.
+
By default, all log files from PBS are only readable by the user owning of the file.
 
You can use a PBS option to change this behaviour so your logs are readable by the user and the group owning the file:
 
You can use a PBS option to change this behaviour so your logs are readable by the user and the group owning the file:
#PBS -W umask=0022
+
#PBS -W umask=0022
 +
== Files created by programs ==
 +
Some programs might impose a different default of the files they create which might not be what you'd like.
 +
=== You have access to the source code ===
 +
If you have access to the source code, it is usually possible to modify the default behaviour. What needs to be modified varies depending on the language. Please contact [mailto:cws_help@nci.org.au the CMS team] if you need help.
 +
=== You don't have access to the source code ===
 +
You then need to add a post-processing step, for example in a bash script calling your program. You can change the permissions on the files created by your program, using the <code>chmod</code> command:
 +
chmod g+r <filename>
 
[[Category:Stub]]
 
[[Category:Stub]]

Revision as of 01:14, 12 August 2019

Template:Stub This is a stub page and needs expansion

This page provides information on how to create files with group read permissions at NCI.

By default, when you create a file under /short of /g/data, the file will be readable by you and the group owning the file. So you don't need to change anything then. But there are a few cases where the default behaviour is different and you may want to change it.

PBS logs

By default, all log files from PBS are only readable by the user owning of the file. You can use a PBS option to change this behaviour so your logs are readable by the user and the group owning the file:

#PBS -W umask=0022

Files created by programs

Some programs might impose a different default of the files they create which might not be what you'd like.

You have access to the source code

If you have access to the source code, it is usually possible to modify the default behaviour. What needs to be modified varies depending on the language. Please contact the CMS team if you need help.

You don't have access to the source code

You then need to add a post-processing step, for example in a bash script calling your program. You can change the permissions on the files created by your program, using the chmod command:

chmod g+r <filename>