GoogleCloudPlatform / GoogleCloudPlatform/gcsfuse
Copy POSIX attributes from bucket
- Dominant language
- Go
- Stars
- 2.3k
- Forks
- 510
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 35
Description
**Describe the issue**
In the GCSFUSE documentation it's mentioned that GCSFUSE doesn't transfer POSIX attributes when uploading files to buckets ([link](https://cloud.google.com/storage/docs/gcs-fuse#expandable-1)). 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.

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`.
Contributor guide
Research direction
Start with the GCSFUSE documentation linked in the issue and reproduce the behavior using `gsutil cp -P`, then mount the bucket and inspect the file mode. Determine how POSIX metadata in the object should map to filesystem attributes; done means attributes such as mode, uid, and gid are applied when available without changing the default behavior when they are absent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, google-cloud
- Domain
- cloud, operating-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100