0
votes

I created a gcs bucket on https://console.cloud.google.com/storage/
and successfully mounted on an instance with gcsfuse, however, when I try to write to the mounted directory, it shows an Input/output error.

fuse_debug: Op 0x00000003        connection.go:395] <- LookUpInode (parent 1, name "test")
gcs: Req              0x1: <- StatObject("test/")
gcs: Req              0x2: <- StatObject("test")
gcs: Req              0x1: -> StatObject("test/") (31.355698ms): gcs.NotFoundError: googleapi: Error 404: Not Found, notFound
gcs: Req              0x2: -> StatObject("test") (51.589538ms): gcs.NotFoundError: googleapi: Error 404: Not Found, notFound
fuse_debug: Op 0x00000003        connection.go:476] -> Error: "no such file or directory"
fuse_debug: Op 0x00000004        connection.go:395] <- MkDir (parent 1, name "test")
gcs: Req              0x3: <- CreateObject("test/")
gcs: Req              0x3: -> CreateObject("test/") (13.513239ms): googleapi: Error 403: Insufficient Permission, insufficientPermissions
fuse_debug: Op 0x00000004        connection.go:476] -> Error: "CreateChildDir: googleapi: Error 403: Insufficient Permission, insufficientPermissions"
fuse: 2016/06/09 02:12:40.128885 *fuseops.MkDirOp error: CreateChildDir: googleapi: Error 403: Insufficient Permission, insufficientPermissions
2

2 Answers

1
votes

It appears from the --foreground --debug_fuse output that you're using credentials that aren't allowed to write to the bucket. They are probably read-only (StatObject didn't return a 403, and gcsfuse checks at startup that it can list the bucket).

Try giving the docs about credentials a careful read. In particular, if you're getting credentials automatically on a Google Compute Engine VM, you probably forgot to create it with the storage-full scope.

1
votes

Please run gcsfuse with --foreground (and perhaps --debug_fuse) to get some indication of what the error is when it happens.