-
Notifications
You must be signed in to change notification settings - Fork 15
Description
#826 introduced the --chmod argument to the SupRsync agent. By default this specifies 'g+rwX' as the permissions to pass to rsync's --chmod flag, which specifies the permissions on the remote end. rsync will modify existing permissions to include the specified permissions, i.e. it won't change 'user' or 'other' permissions in this default case.
The way SupRsync readies files for transfer on the local (SMuRF server) end of things is it creates a temporary directory and populates it full of symlinks to files it needs to copy. rsync is then passed the -L argument, in order to copy the files that are linked to the remote. The temporary directory is created using Python's tempfile.TemporaryDirectory, which creates a directory with the same rules as tempfile.mkdtemp:
Creates a temporary directory in the most secure manner possible. There are no race conditions in the directory’s creation. The directory is readable, writable, and searchable only by the creating user ID.
This results in a top level directory that has drwx------ permissions. With the current default this results in a top level directory on the remote (i.e. /so/level2-daq/lat/smurf/) with drwxrwx--- permissions, when what we really want is drwxrwxr-x so that other users can read the files.