scitokens / xrootd-scitokens

SciTokens authorization plugin for the Xrootd server framework
Apache License 2.0
1 stars 7 forks source link

Unable to DELETE non-empty directory #26

Open vokac opened 4 years ago

vokac commented 4 years ago

It is not possible to delete directories that contains some files, e.g.

curl -v --capath /etc/grid-security/certificates -L -X PUT -H "Authorization: Bearer $TOKEN" --upload-file /etc/services https://red-gridftp12.unl.edu:1094/user/dteam/TEST/a
curl -v --capath /etc/grid-security/certificates -L -X DELETE -H "Authorization: Bearer $TOKEN" https://red-gridftp12.unl.edu:1094/user/dteam/TEST

Attempt to delete non-empty directory fails with error message

< HTTP/1.1 500 Internal Server Error
< Connection: Keep-Alive
< Content-Length: 53
< 
Unable to remove /user/dteam/TEST; unknown error 255

Deleting empty directory is works fine, but DELETE normally recursively delete everything

curl -v --capath /etc/grid-security/certificates -L -X DELETE -H "Authorization: Bearer $TOKEN" https://red-gridftp12.unl.edu:1094/user/dteam/TEST/a
curl -v --capath /etc/grid-security/certificates -L -X DELETE -H "Authorization: Bearer $TOKEN" https://red-gridftp12.unl.edu:1094/user/dteam/TEST
djw8605 commented 4 years ago

I will check with the XRootD developers. This may be something being lost in translation.

djw8605 commented 4 years ago

I made an issue over on the main XRootD project: https://github.com/xrootd/xrootd/issues/1222