BCCDC-PHL / illumina-uploader

Watch for new files in Illumina sequencer and upload to remote server
3 stars 1 forks source link

Support uploading run with immutable permissions #69

Open dfornika opened 3 months ago

dfornika commented 3 months ago

Our config includes a chmodcommand entry that allows us to control the permssions on the uploaded files:

https://github.com/BCCDC-PHL/illumina-uploader/blob/ecde03269464c9aec99f4fe70e3cfd62a4a2edd9/config.json.template#L48

We'd like to configure that such that all uploaded sequencing runs are 'immutable' when they arrive on the remote system. So all directories should have permissions 550 (r-xr-x---) and all files should have permissions 440 (r--r-----)

In the past when we've tried setting the chmodcommand this way it prevented us from finalizing the upload by uploading the upload_complete.json file. This wasn't working because the top-level run directory was not writable.

If we're able to, we should temporarily make the top-level uploaded directory writable before attempting to upload the upload_complete.json file.

This can probably be done within the scpUploadCompleteJson() function:

https://github.com/BCCDC-PHL/illumina-uploader/blob/ecde03269464c9aec99f4fe70e3cfd62a4a2edd9/illumina_uploader/fabfile.py#L55

kcphsa commented 2 months ago

Put up PR https://github.com/BCCDC-PHL/illumina-uploader/pull/70 to deal with this