gaul / s3proxy

Access other storage backends via the S3 API
Apache License 2.0
1.73k stars 223 forks source link

Backblaze B2 directory creation #316

Open kernworks opened 4 years ago

kernworks commented 4 years ago

System: CentOS Linux release 7.7.1908 (Core) s3fs version 1.85 pulled from CentOS epel repo. java-1.8.0-openjdk-1.8.0.232.b09-0.el7_7

I am using s3fs on top of s3proxy. My s3proxy is connected to Backblaze B2.

When trying to do a mkdir I get an Input/output error.

curl.cpp:RequestPerform(2248): HTTP response code 400, returning EIO. Body Text:

Error 400

HTTP ERROR: 400

Problem accessing /**BUCKET**/test/. Reason:

    File names must not end with '/'


Powered by Jetty://

Upon further research, this is a B2 api thing. Reference https://www.backblaze.com/blog/how-to-code-backblaze-b2-api-interface/

Directory Objects don’t exist: Unlike Amazon, where an object with that ends with a “/” is considered a directory, this does not port to B2. There is an undocumented object name that B2 applications use called .bzEmpty. Numerous 3rd party applications, including BridgeSTOR, treat an object ending with .bzEmpty as a directory name. This is also important for directory listings described above. If you choose to use this method, you will be required to replace the “.bzEmpty” with a “/.”

I'm not sure if this is a s3proxy issue or a JClouds issue but it would be nice to be able to get it resolved.

The workaround I use is to create the directory structure using the B2 "Browse Files" feature on your account and then creating directories in the bucket from there.

gaul commented 3 years ago

Could you test s3fs with Backblaze's native S3 API? This likely works better than S3Proxy.