Skip to content

Commit

Permalink
adjusting the NFS zip file permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
PhillipsOwen committed Apr 11, 2024
1 parent 93586be commit e7946b3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/staging/staging.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import shutil
import sys
import glob
import zipfile

from src.common.logger import LoggingUtil
from src.common.pg_impl import PGImplementation
Expand Down Expand Up @@ -292,6 +293,9 @@ def final_staging(self, run_id: str, run_dir: str, staging_type: StagingType) ->
# compress the directory into the package directory
shutil.make_archive(nfs_archive_file, 'zip', run_dir)

# adjust the file properties of the archive to 775
os.chmod(nfs_archive_file, 0o775)

# remove all directories from the run (leaving the archive file)
[shutil.rmtree(data_dir, ignore_errors=True) for data_dir in glob.glob(f'{run_dir}/**/')]
else:
Expand Down

0 comments on commit e7946b3

Please sign in to comment.