GoogleCloudPlatform / gcsfuse

A user-space file system for interacting with Google Cloud Storage

Home Page:https://cloud.google.com/storage/docs/gcs-fuse

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Copy POSIX attributes from bucket

tarun360 opened this issue · comments

Describe the issue
In the GCSFUSE documentation it's mentioned that GCSFUSE doesn't transfer POSIX attributes when uploading files to buckets (link). However, nothing is mentioned regarding if POSIX attributes would be copied if they are available as metadata in the objects. On manual testing, I noticed that POSIX attributes are not copied.

I suppose, if POSX attributes are available as meta-data in the objects, then that should be copied as well? This could be very useful especially for things like file mode, uid, gid.

In case of gsutil cp, the -P flag allows POSIX attributes to be both uploaded as metadata, and then during download these POSIX attributes are set for the files.
image

Is there any particular reason against copying of POSIX attributes?

Steps to reproduce the behavior

  1. Create a file with file mode other than 0644 (default file mode set by GCSFUSE)
  2. Copy it to a bucket using gsutil cp -P
  3. Mount the bucket using GCSFUSE. Check the file mode of the file, it will be 0644.

HI @tarun360 ,

Thanks for reaching out to us. Currently, this feature is not available in GCSFuse. We will look into it. Moreover, is there any specific attribute you are looking for?

Thanks,
Tulsi Shah

Thanks for the quick response.

Moreover, is there any specific attribute you are looking for?

I was looking for UID, GID and file mode attributes.

This feature is really important for my purposes, as well. 🙏

While we're at it, any file attributes from the Storage Transfer Service should also work.