goofys icon indicating copy to clipboard operation
goofys copied to clipboard

touch fails on basic non-AWS mount (DigitalOcean Spaces)

Open keybrdist opened this issue 6 years ago • 6 comments

I've mounted using the following and I can read files but cannot write. My key has proper permissions and works using s3fs. I also tried adding -o use_path_request_style (--use-path-request is invalid)

goofys v0.19.0

goofys --debug_fuse --debug_s3 --endpoint http://ams3.digitaloceanspaces.com/ --file-mode=0777 --dir-mode=0777 --profile data data /mnt/users

Any attempt to writes to /mnt/users fails: touch users/testsasdfasdf.txt touch: failed to close 'users/testsasdfasdf.txt': Permission denied

The syslog

Apr  5 21:20:53 dev /usr/bin/goofys[28960]: fuse.DEBUG Op 0x000000cb        connection.go:395] <- GetInodeAttributes (inode 1)
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: fuse.DEBUG GetAttributes 1  []
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: fuse.DEBUG Op 0x000000cb        connection.go:478] -> OK ()
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: fuse.DEBUG Op 0x000000cc        connection.go:395] <- LookUpInode (parent 1, name "testsasdfasd1f.txt")
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: fuse.DEBUG Inode.LookUp 1  [testsasdfasd1f.txt]
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: s3.DEBUG DEBUG: Request s3/ListObjects Details:#012---[ REQUEST POST-SIGN ]-----------------------------#012GET /data?delimiter=%2F&max-keys=1&prefix=testsasdfasdf.txt%2F HTTP/1.1#015#012Host: ams3.digitaloceanspaces.com#015#012User-Agent: aws-sdk-go/1.8.25 (go1.8; linux; amd64)#015#012Accept-Encoding: identity#015#012Authorization: AWS4-HMAC-SHA256 Credential=URV2xxxSFJXB/20180405/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=3xxx8a27#015#012X-Amz-Content-Sha256: e3b0cxxx52b855#015#012X-Amz-Date: 20180405T212053Z#015#012#015#012#012-----------------------------------------------------
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: s3.DEBUG DEBUG: Request s3/HeadObject Details:#012---[ REQUEST POST-SIGN ]-----------------------------#012HEAD /data/testsasdfasdf.txt HTTP/1.1#015#012Host: ams3.digitaloceanspaces.com#015#012User-Agent: aws-sdk-go/1.8.25 (go1.8; linux; amd64)#015#012Authorization: AWS4-HMAC-SHA256 Credential=URV22KT6xxxQSFJXB/20180405/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=febb9660xxx65a7218#015#012X-Amz-Content-Sha256: e3b0c44298xxx991b7852b855#015#012X-Amz-Date: 20180405T212053Z#015#012#015#012#012-----------------------------------------------------
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: s3.DEBUG DEBUG: Request s3/HeadObject Details:#012---[ REQUEST POST-SIGN ]-----------------------------#012HEAD /data/testsasdfasdf.txt/ HTTP/1.1#015#012Host: ams3.digitaloceanspaces.com#015#012User-Agent: aws-sdk-go/1.8.25 (go1.8; linux; amd64)#015#012Authorization: AWS4-HMAC-SHA256 Credential=URV22KT6xxxSQSFJXB/20180405/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=d7e103a9001b85ae8e35bf24099axxx47952530b6cbff9e0#015#012X-Amz-Content-Sha256: e3b0c44298fc1c149afbf4c8996fb9242xxx852b855#015#012X-Amz-Date: 20180405T212053Z#015#012#015#012#012-----------------------------------------------------
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: s3.DEBUG DEBUG: Response s3/HeadObject Details:#012---[ RESPONSE ]--------------------------------------#012HTTP/1.1 404 Not Found#015#012Content-Length: 214#015#012Accept-Ranges: bytes#015#012Content-Type: application/xml#015#012Date: Thu, 05 Apr 2018 21:20:53 GMT#015#012Strict-Transport-Security: max-age=15552000; includeSubDomains; preload#015#012X-Amz-Request-Id: tx000000000000000821218-005ac69335-db833-ams3a#015#012#015#012#012-----------------------------------------------------
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: s3.DEBUG DEBUG: Validate Response s3/HeadObject failed, not retrying, error NotFound: Not Found#012#011status code: 404, request id: tx000000000000000821218-005ac69335-db833-ams3a, host id:
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: s3.DEBUG HEAD testsasdfasd1f.txt = no such file or directory
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: s3.DEBUG DEBUG: Response s3/HeadObject Details:#012---[ RESPONSE ]--------------------------------------#012HTTP/1.1 404 Not Found#015#012Content-Length: 214#015#012Accept-Ranges: bytes#015#012Content-Type: application/xml#015#012Date: Thu, 05 Apr 2018 21:20:53 GMT#015#012Strict-Transport-Security: max-age=15552000; includeSubDomains; preload#015#012X-Amz-Request-Id: tx00000000000000081febb-005ac693xxc6dd-ams3a#015#012#015#012#012-----------------------------------------------------
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: s3.DEBUG DEBUG: Validate Response s3/HeadObject failed, not retrying, error NotFound: Not Found#012#011status code: 404, request id: tx00000000000000081febb-005ac69335-bc6dd-ams3a, host id:
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: s3.DEBUG HEAD testsasdfasd1f.txt/ = no such file or directory
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: s3.DEBUG DEBUG: Response s3/ListObjects Details:#012---[ RESPONSE ]--------------------------------------#012HTTP/1.1 200 OK#015#012Content-Length: 277#015#012Content-Type: application/xml#015#012Date: Thu, 05 Apr 2018 21:20:53 GMT#015#012Strict-Transport-Security: max-age=15552000; includeSubDomains; preload#015#012X-Amz-Request-Id: tx000000000000000821219-005ac69335-db833-ams3a#015#012#015#012#012-----------------------------------------------------
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: s3.DEBUG {#012  Delimiter: "/",#012  IsTruncated: false,#012  Marker: "",#012  MaxKeys: 1,#012  Name: "data",#012  Prefix: "testsasdfasd1f.txt/"#012}
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: fuse.DEBUG <-- LookUpInode 1 testsasdfasd1f.txt no such file or directory
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: fuse.DEBUG Op 0x000000cc        connection.go:480] -> Error: "no such file or directory"
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: fuse.DEBUG Op 0x000000cd        connection.go:395] <- CreateFile (parent 1, name "testsasdfasd1f.txt")
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: fuse.DEBUG Create 1  [testsasdfasd1f.txt]
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: fuse.DEBUG <-- CreateFile 188 testsasdfasd1f.txt []
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: fuse.DEBUG Op 0x000000cd        connection.go:478] -> OK (inode 188)
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: fuse.DEBUG Op 0x000000ce        connection.go:395] <- FlushFile (inode 188)
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: fuse.DEBUG FlushFile 188 testsasdfasd1f.txt []
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: s3.DEBUG DEBUG: Request s3/PutObject Details:#012---[ REQUEST POST-SIGN ]-----------------------------#012PUT /data/testsasdfasd1f.txt HTTP/1.1#015#012Host: ams3.digitaloceanspaces.com#015#012User-Agent: aws-sdk-go/1.8.25 (go1.8; linux; amd64)#015#012Content-Length: 0#015#012Authorization: AWS4-HMAC-SHA256 Credential=URV2xxxSQSFJXB/20180405/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date;x-amz-storage-class, Signature=fa8262527e0f3xxxdee866a09c7f1d58517#015#012X-Amz-Content-Sha256: e3b0c44298fc1c149axxx1b7852b855#015#012X-Amz-Date: 20180405T212053Z#015#012X-Amz-Storage-Class: STANDARD#015#012Accept-Encoding: gzip#015#012#015#012#012-----------------------------------------------------
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: s3.DEBUG DEBUG: Response s3/PutObject Details:#012---[ RESPONSE ]--------------------------------------#012HTTP/1.1 403 Forbidden#015#012Content-Length: 189#015#012Accept-Ranges: bytes#015#012Content-Type: application/xml#015#012Date: Thu, 05 Apr 2018 21:20:53 GMT#015#012Strict-Transport-Security: max-age=15552000; includeSubDomains; preload#015#012X-Amz-Request-Id: tx00000000000000081febc-005ac69335-bc6dd-ams3a#015#012#015#012#012-----------------------------------------------------
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: s3.DEBUG DEBUG: Validate Response s3/PutObject failed, not retrying, error SignatureDoesNotMatch: #012#011status code: 403, request id: tx00000000000000081febc-005ac69335-bc6dd-ams3a, host id:
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: fuse.DEBUG <-- FlushFile 188 testsasdfasd1f.txt [permission denied]
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: fuse.DEBUG Op 0x000000ce        connection.go:480] -> Error: "permission denied"
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: fuse.DEBUG Op 0x000000cf        connection.go:395] <- SetInodeAttributes (inode 188, atime 2018-04-05 21:20:53.464831215 +0000 UTC, mtime 2018-04-05 21:20:53.464831215 +0000 UTC)
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: fuse.DEBUG GetAttributes 188 testsasdfasd1f.txt []
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: fuse.DEBUG Op 0x000000cf        connection.go:480] -> Error: "no such file or directory"
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: fuse.DEBUG Op 0x000000d0        connection.go:395] <- FlushFile (inode 188)
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: fuse.DEBUG FlushFile 188 testsasdfasd1f.txt []
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: fuse.DEBUG <-- FlushFile 188 testsasdfasd1f.txt [permission denied]
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: fuse.DEBUG Op 0x000000d0        connection.go:480] -> Error: "permission denied"
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: fuse.DEBUG Op 0x000000d1        connection.go:395] <- ReleaseFileHandle
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: fuse.DEBUG ReleaseFileHandle testsasdfasd1f.txt
Apr  5 21:20:53 dev /usr/bin/goofys[28960]: fuse.DEBUG Op 0x000000d1        connection.go:478] -> OK ()

keybrdist avatar Apr 05 '18 21:04 keybrdist

Exact same issue here with DigitalOcean Spaces.

goofys -v:

goofys version 0.19.0-943e017724ea820eb4185419ef3c41d6f921a324

uname -a:

Linux nyc3-01 4.4.0-130-generic #156-Ubuntu SMP Thu Jun 14 08:53:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

TLDR seems to be related to error SignatureDoesNotMatch, which is also in my syslog:

2018/07/21 19:25:24.977681 s3.DEBUG DEBUG: Validate Response s3/PutObject failed, not retrying, error SignatureDoesNotMatch: status code: 403, request id: tx000000000000002e0641c-005b53c0e4-a3d017-nyc3a, host id: 2018/07/21 19:25:24.977880 catfs.INFO 2018-07-21 19:25:24 ERROR - !flush(src) = Permission denied (os error 13) 2018/07/21 19:25:24.979882 catfs.INFO 2018-07-21 19:25:24 ERROR - <-- !flush 0000000000000001 = Permission denied (os error 13)

Edit: no clue why, but I installed s3tools 2.x, configured it for Digital Ocean spaces, and then goofys works as expected.

austinheap avatar Jul 21 '18 23:07 austinheap

I'm having this issue as well. Even when touching as root user.

Alladinsane avatar Dec 14 '18 21:12 Alladinsane

Exact same issue here with DigitalOcean Spaces.

goofys -v:

goofys version 0.19.0-943e017724ea820eb4185419ef3c41d6f921a324

uname -a:

Linux nyc3-01 4.4.0-130-generic #156-Ubuntu SMP Thu Jun 14 08:53:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

TLDR seems to be related to error SignatureDoesNotMatch, which is also in my syslog:

2018/07/21 19:25:24.977681 s3.DEBUG DEBUG: Validate Response s3/PutObject failed, not retrying, error SignatureDoesNotMatch: status code: 403, request id: tx000000000000002e0641c-005b53c0e4-a3d017-nyc3a, host id: 2018/07/21 19:25:24.977880 catfs.INFO 2018-07-21 19:25:24 ERROR - !flush(src) = Permission denied (os error 13) 2018/07/21 19:25:24.979882 catfs.INFO 2018-07-21 19:25:24 ERROR - <-- !flush 0000000000000001 = Permission denied (os error 13)

Edit: no clue why, but I installed s3tools 2.x, configured it for Digital Ocean spaces, and then goofys works as expected.

Hi, can You please explain it more detail about installing s3tools and goofys works? I've got this issue and installed s3tools but still not working.. thank you

bintt avatar Dec 25 '18 15:12 bintt

just found the problem: change this option --endpoint http://ams3.digitaloceanspaces.com/ to --endpoint ams3.digitaloceanspaces.com and it works well

bintt avatar Dec 25 '18 15:12 bintt

I'm having the same issue running on Wasabi. I tried all of the suggested methods above and nothing's fixing the problem. Whenever I try to create a file, it returns the error cp: failed to close '{file}: No such file or directory, and then when I try a second time it returns cp: cannot create regular file '{file}': File exists, however the file does not exist when I ls the directory.

I tried fixing the endpoint URL, installing s3tools 2.x, etc and nothing seems to actually resolve it.

therecluse26 avatar Oct 16 '19 16:10 therecluse26

Crazy, @bintt's advice fixed my problem as well. Looks like some quirky behaviour of goofys. It should probably normalize the endpoint parameter.

djmaze avatar Mar 19 '21 13:03 djmaze