This allows retries of multi-part uploads instead of discovering a
fatal error during complete multipart upload. Also enable Content-MD5
for integration tests and refactor hexadecimal code.
Previously AutoLock::Lock allowed subsequent callers to proceed
without the lock. Further is_locked was not always protected by
auto_mutex. Finally AutoLock eagerly released auto_mutex when
recursively unlocking. s3fs does not need recursive locks so we
rewrite and simplify AutoLock. Partially surfaced by Coverity.
These system calls take an extra 'position' parameter on OS X. A
non-zero position value is only valid for resource forks (the Darwin
VFS layer will reject anything else with EINVAL); this patch simply
adds and ignores the parameter on Apple platforms.
Allows building against OSXFUSE.
This also encodes asterisk and tilde correctly when listing a file
with a V4 auth endpoint. Also add tests for special characters
although s3proxy does not yet support V4 auth.
Fixes#188. Fixes#194.
change the minimum version of fuse required. Change the
checkers to use a variable for the minimum fuse version
instead of it being hardcoded in four different places.
src/s3fs.cpp: Use __APPLE__ define around fuse code that
is offensive to osxfuse. Not including the code doesn't
seem to matter.
Buckets with mixed-case names can't be accessed with the virtual-hosted
style API due to DNS limitations. S3FS has an option for
pathrequeststyle which is used for the URL, but it was not applied when
building the endpoint passed through the Host header. Fix this, and
relax the validation on bucket names when using this style.
See: http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingBucket.html#access-bucket-intro
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Query parameters need a trailing = for V4 signatures. Send correct
content-sha256 although Amazon does not seem to enforce this for
zero-length bodies. Finally remove a stale comment. Fixes#133.
nautilus does this when you drag and drop to overwrite a file:
1) create .goutputstream-XXXXXX to write to
2) fsync the fd for .goutputstream-XXXXXX
3) rename .goutputstream-XXXXXX to target file
4) close the fd for .goutputstream-XXXXXX
previously, doing this on s3fs would result in an empty target file
because after the rename, s3fs would not flush the content of
.goutputstream-XXXXXX to target file.
this change moves the FdEntity from the old path to the new path
whenever rename happens. On flush s3fs would now flush the correct
content to the rename target.
Subsequent commits will use this infrastructure. Also reparent
prepare_url which relies on unrelated bucket, foreground2, and
pathrequeststyle symbols.
The space causes signature mismatch when using "ahbe_conf" file to add additional headers.When s3 use the" x-amaz" header to calculates the signature, the format is as follow:
PUT
application/octet-stream
Wed, 05 Nov 2014 03:05:08 GMT
x-amz-acl:private
x-amz-meta-gid:0
x-amz-meta-mode:33188
x-amz-meta-mtime:1415156708
x-amz-meta-uid:0
There is no space after colon.
When the scheme is omitted in URL overriding (for example `example.com`
instead of `https://example.com`), s3fs is modifying the URL by
inserting `s3.` in the middle of the name (`examples3..com`).
This can be a bit difficult to troubleshoot and curl seems to handle
schema-less requests just fine. So, just handle this case correctly.
Previously S3fsMultiCurl::MultiRead did not report read errors since
it did not treat failed callback setup as a fatal operation error.
Failed callback setups usually result from exceeding the number of
allowed retries. Previously cp did not report an error during a
network outage but now does:
$ cp ~/s3-path/s3-file .
cp: error reading ‘/home/gaul/s3-path/s3-file’: Input/output error
cp: failed to extend ‘./s3-file’: Input/output error
Rather than using virtual host style requests, path style requests can be used
instead.
i.e. rather than bucketname.s3.amazon.com/... the s3fs will be able to request
from s3.amazon.com/bucketname/...
This is useful for S3 compatible APIs which don't support the virtual host style
request.
It is enabled with the new option, `use_path_style_request`.
Example:
/usr/bin/s3fs data ~/netcdf -o url="https://swift.rc.nectar.org.au:8888/" -o use_path_request_style -o allow_other -o uid=500 -o gid=500