Opened 9 years ago

Last modified 9 years ago

#863 closed task

Secondary analysis scripts should set permissions on created files in ProjectArchive — at Version 2

Reported by: Nicklas Nordborg Owned by: Nicklas Nordborg
Priority: major Milestone: Reggie v4.3
Component: net.sf.basedb.reggie Keywords:
Cc:

Description (last modified by Nicklas Nordborg)

This is related to #864.

Files generated on the project archive file server by secondary analysis scripts should by default only be readable/writable by the user. If a Case can be found that has Consent=Yes the permission on the generated files can be changed so that the group has read permission as well. Permissions on directories should follow the same pattern, but they also need "execute" permission.

After investigating the umask command (https://en.wikipedia.org/wiki/Umask) it seems like this would be relatively simple by including just one line at the beginning of the script:

  • umask 0077 or umask -S u=rwx,g=,o= if there is no consent
  • umask 0027 or umask -S u=rwx,g=rx,o= if there is a consent

New files should then automatically be created with correct permissions.

Change History (2)

comment:1 by Nicklas Nordborg, 9 years ago

Description: modified (diff)

comment:2 by Nicklas Nordborg, 9 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.