unioslo / tsd-s3cmd

Wrapper for s3cmd, for the TSD API
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

Removing files/bucket fails #16

Open espenhgn opened 3 months ago

espenhgn commented 3 months ago

I'm trying to delete a bucket with a couple of junk files on TSD, failing with:

$ tsd-s3cmd rb s3://mybucket --recursive
User > <TSD-project-user>
Password > 
OTP > 123456
ERROR: Error parsing xml: mismatched tag: line 6, column 2
ERROR: b'<html>\r\n<head><title>401 Authorization Required</title></head>\r\n<body>\r\n<center><h1>401 Authorization Required</h1></center>\r\n<hr><center>nginx</center>\r\n</body>\r\n</html>\r\n'
ERROR: S3 error: 401 (Unauthorized)

using the same credentials as for sending files (which works). Any suggestions? I get the same response attempting to delete specific files, e.g.:

$ tsd-s3cmd del s3://mybucket/hello.txt
haatveit commented 2 months ago

DELETE requests are not something we have supported, no. I will investigate whether it's something we can open up for.

espenhgn commented 2 months ago

I think delete requests should be allowed, as an alternative to ugliness like

tsd-s3cmd sync --no-check-md5 --delete-removed --force MyFolder s3://MyBucket

where MyFolder is an empty directory named similarly to another directory with files within the bucket synced to TSD.