Skip to content

Commit

Permalink
Merge pull request DIRACGrid#7304 from sfayer/fix_selinux_pilotsync
Browse files Browse the repository at this point in the history
[8.0] Use copy+remove in PilotSync agent to avoid SELinux problems
  • Loading branch information
fstagni committed Nov 24, 2023
2 parents 320ecd4 + 9d7bad2 commit 0eafb3a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/DIRAC/WorkloadManagementSystem/Agent/PilotSyncAgent.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ def execute(self):
self.log.info("Moving pilot files", f"to {self.saveDir}")
for tf in allFiles:
# this overrides the destinations
shutil.move(tf, os.path.join(self.saveDir, os.path.basename(tf)))
# use copy & remove rather than move to reset SELinux context on files
shutil.copy(tf, os.path.join(self.saveDir, os.path.basename(tf)))
os.remove(tf)

# Here, attempting upload somewhere, and somehow
for server in self.uploadLocations:
Expand Down

0 comments on commit 0eafb3a

Please sign in to comment.