diff --git a/storage_service/locations/models/space.py b/storage_service/locations/models/space.py index ecc313252..1d3f7b119 100644 --- a/storage_service/locations/models/space.py +++ b/storage_service/locations/models/space.py @@ -462,7 +462,7 @@ def move_rsync(self, source, destination, try_mv_local=False, assume_rsync_daemo # Rsync file over # TODO Do this asyncronously, with restarting failed attempts - command = ['rsync', '-t', '-O', '--protect-args', '-vv', '--chmod=ugo+rw', '-r', source, destination] + command = ['rsync', '-t', '-O', '--protect-args', '-vv', '--chmod=F660,D770', '-r', source, destination] LOGGER.info("rsync command: %s", command) kwargs = {'stdout': subprocess.PIPE, 'stderr': subprocess.STDOUT} if assume_rsync_daemon: @@ -532,7 +532,7 @@ def create_rsync_directory(self, destination_path, user, host): for directory in directories: path = os.path.join(os.path.dirname(directory), '') path = "{}@{}:{}".format(user, host, utils.coerce_str(path)) - cmd = ['rsync', '-vv', '--protect-args', '--chmod=ugo+rw', '--recursive', temp_dir, path] + cmd = ['rsync', '-vv', '--protect-args', '--chmod=ug=rwx,o=rx', '--recursive', temp_dir, path] LOGGER.info("rsync path creation command: %s", cmd) try: subprocess.check_call(cmd)