edf-hpc / clara

Cluster Administration tools
Other
18 stars 12 forks source link

Clara p2p should enforce mode of sftp pushed torrent file to 0644 #137

Closed rezib closed 1 year ago

rezib commented 2 years ago

Clara p2p can sftp push the generated torrent file: https://github.com/edf-hpc/clara/blob/a738808af141165c192bb29a463c3f71fad26990/clara/plugins/clara_p2p.py#L115

When it pushes the file, it should enforce the mode to 0644 to make sure the remote httpd server can read the file. Without explicit mode, the file is sensible to umask, resulting in httpd unable to read the file with restricted umask (ex: 0077).

The corresponding method already accepts the mode parameter: https://github.com/edf-hpc/clara/blob/a738808af141165c192bb29a463c3f71fad26990/clara/sftp.py#L86

Then it shouldn't be a big deal.