opensciencegrid / stashcp

Apache License 2.0
0 stars 10 forks source link

Support authenticated directory listings #43

Open matyasselmeci opened 2 years ago

matyasselmeci commented 2 years ago

If doing writeback and the destination directory is read-protected, checking if the destination is a directory fails as follows:

time="2022-06-21T12:11:58-04:00" level=debug msg="In UploadFile"
time="2022-06-21T12:11:58-04:00" level=debug msg="Dest stash:///ospool/PROTECTED/matyas.selmeci/myenv21"
time="2022-06-21T12:11:58-04:00" level=debug msg="Failed to ReadDir: ReadDir /ospool/PROTECTED/matyas.selmeci/myenv21: 403 Forbidden - PROPFIND /ospool/PROTECTED/matyas.selmeci/myenv21 for URL: https://origin-auth2001.chtc.wisc.edu:1095/"
time="2022-06-21T12:11:58-04:00" level=warning msg="Received an error from checking if dest was a directory.  Going to continue as if there was no error"

The token should be used for the ReadDir call, not just writing.