Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recursively deleting directories with davix-rm not working #67

Open
ffornari90 opened this issue May 19, 2021 · 1 comment
Open

Recursively deleting directories with davix-rm not working #67

ffornari90 opened this issue May 19, 2021 · 1 comment

Comments

@ffornari90
Copy link

Hi,
I'm trying to recursively delete a directory with davix-rm (as reported here https://www.systutorials.com/docs/linux/man/1-davix-rm/) but it does not seem to work.
This is the directory:

davix-ls -l --capath /etc/grid-security/certificates/ -H "Authorization: Bearer ${BEARER_TOKEN}" davs://xfer-archive.cr.cnaf.infn.it:8443/jlab12/fornariclas12
-rwxrwxrwx 0 9442 2021-05-19 09:24:14 certs.p12
-rwxrwxrwx 0 494 2021-05-19 09:24:37 oidc-agent-stat.sh

And this is what I see when I try to delete it:

davix-rm --capath /etc/grid-security/certificates/ -H "Authorization: Bearer ${BEARER_TOKEN}" davs://xfer-archive.cr.cnaf.infn.it:8443/jlab12/fornariclas12/
(Davix::rm) Error: HTTP 412 : Server Error with url davs://xfer-archive.cr.cnaf.infn.it:8443/jlab12/fornariclas12/

Anyways, gfal-rm -r seems to work on the same directory:

gfal-rm -r davs://xfer-archive.cr.cnaf.infn.it:8443/jlab12/fornariclas12 2>/dev/null
davs://xfer-archive.cr.cnaf.infn.it:8443/jlab12/fornariclas12/certs.p12 DELETED
davs://xfer-archive.cr.cnaf.infn.it:8443/jlab12/fornariclas12/oidc-agent-stat.sh DELETED
davs://xfer-archive.cr.cnaf.infn.it:8443/jlab12/fornariclas12 RMDIR

davix-ls -l --capath /etc/grid-security/certificates/ -H "Authorization: Bearer $AT" davs://xfer-archive.cr.cnaf.infn.it:8443/jlab12/fornariclas12
(Davix::HttpRequest) Error: HTTP 404 : File not found

Is it possible to make davix-rm behave the same way as gfal-rm -r with respect to directories?
For your information, these are the versions involved:

gfal-rm --version
gfal2-util version 1.5.3 (gfal2 2.18.1)
dcap-2.18.1
file-2.18.1
gridftp-2.18.1
http-2.18.1
lfc-2.18.1
rfio-2.18.1
sftp-2.18.1
srm-2.18.1
xrootd-2.18.1

davix-rm --version
Version: 0.7.5

Thanks for your attention.

@mpatrascoiu
Copy link
Contributor

Hello,

This request comes up from time to time (e.g.: DMC-1197).

Davix implements delete traversal only for S3 protocol. WebDav supports delete on collections so a single DELETE <directory-path> request should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants