1

I'm trying to mount a google cloud storage bucket with the Google Fuse plugin and share it over Samba.

Mounting the bucket works fine. I'm using the following command:

gcsfuse --uid 1001 --gid 1002 --only-dir data -o allow_other bucket-name /mnt/bucket/data

The -o allow_other flag is required as the samba user needs access to the directory.

My samba share config is listed below.

[myshare]
path = /mnt/bucket/data
valid users = %U
writable = yes
durable handles = yes
kernel oplocks = no
kernel share modes = no
posix locking = no
ea support = yes
browseable = yes
read only = No
inherit acls = yes

Now, everything seems to work. I can create files in the mounted cloud storage bucket as long as I'm connected to the server with ssh. I can even connect to the samba share and read all the files.
There is only one issue. And it's a really weird one. If I try to upload files over samba directly, it fails (error code -50 in a mac finder, Permission denied with cp). But oddly enough the file I'm trying to upload is created on the share as an empty file. So it seems like I am allowed to create files as obviously one is created, but the client doesn't seem to understand it and fails without uploading the complete file.

Is there an issue with my setup? Isn't it possible to share fuse mounted drives over samba?

Andrew Gaul
  • 2,296
  • 1
  • 12
  • 19
Ybrin
  • 901
  • 8
  • 30
  • There is a chance that Finder tries to write an alternate data stream in addition to the file. In smb.conf try configuring both the Mac support vfs "fruit" and the streams support vfs "streams_xattr": `vfs objects = fruit streams_xattr` There is a chance that this fuse fs won't support extended attributes. An alternative to xattr is keeping the streams as files with "depot". In that case: `vfs objects = fruit streams_depot` – Oren Kishon Mar 26 '19 at 00:23
  • @OrenKishon Setting streams_depot did work at least for the command line "cp". Finder still complains with the same error message. Unfortunately -50 is a very generic error message. Do you have another idea? But thanks for that. At least it works now with the command line... – Ybrin Mar 26 '19 at 06:27
  • The next step should be sniffing with Wireshark (filter: `SMB2`) the exact moment of the drag&drop. See exactly which operation causes an error. – Oren Kishon Mar 26 '19 at 11:02

0 Answers0