NorwegianVeterinaryInstitute / DemultiplexRawSequenceData

A workflow automation script: demultiplex the library sequence, run quality checks, deliver to archiving and processing afterwards
GNU General Public License v3.0
1 stars 0 forks source link

os.chmod( demux.sampleSheetFilePath, currentPermissions & ~stat.S_IEXEC ) # demux.SampleSheetFilePath is probably +x, remnant from windows transfer, so remove execute bit ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PermissionError: [Errno 1] Operation not permitted: '/data/rawdata/230919_M06578_0168_000000000-DHTMT/SampleSheet.csv' #73

Closed georgemarselis-nvi closed 9 months ago

georgemarselis-nvi commented 9 months ago

os.chmod( demux.sampleSheetFilePath, currentPermissions & ~stat.S_IEXEC ) # demux.SampleSheetFilePath is probably +x, remnant from windows transfer, so remove execute bit ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ PermissionError: [Errno 1] Operation not permitted: '/data/rawdata/230919_M06578_0168_000000000-DHTMT/SampleSheet.csv'

here, i am trying to alter the x bit of a file belonging to another user.

in my coding environment i was the owner of the rawdata/RunID, the RunID_demux and the for_transfer , so i did not account for this.

the devil is in the details./

georgemarselis-nvi commented 9 months ago

disabled all os.chmod() calls:

In my dev environment, i own all the files . in production, there are different users writing under /data/rawdata . the idea with os.chmod() was to normalize permissions: 644 for files, 755 for directories.

I will have to find another mechanism to perform this file and directory normalization