TabFS icon indicating copy to clipboard operation
TabFS copied to clipboard

Set UID/GID

Open AstraLuma opened this issue 4 years ago • 3 comments

Using this on a managed Mac, 10.15.7, using osxfuse from homebrew.

Currently, virtual files are created under root:wheel, with only root having write permissions. This makes it annoying to actually poke at it.

Please create the files with their UID/GID set, so the user can actually use them.

AstraLuma avatar Jan 08 '21 17:01 AstraLuma

I added this to tabfs_getattr() and it seemed to do it:

    stbuf->st_uid = getuid();
    stbuf->st_gid = getgid();

AstraLuma avatar Jan 08 '21 18:01 AstraLuma

Thanks for the report. I'm not familiar with "managed Mac" -- does that imply that there are extra restrictions on file access that require UID/GID to be set?

My understanding was that FUSE doesn't normally enforce permissions and just has a blanket policy that the user running the filesystem can (exclusively) access it, although I don't have a reference for this off the top of my head. I could be wrong here / am happy to implement this if it's useful.

osnr avatar Jan 10 '21 09:01 osnr

I mean, It's a work laptop that IT has hooks on.

Yes, this patch for me took the mount from "usable only by root" to "usable by the user". But I also had to undo some of the osxfuse name stuff.

AstraLuma avatar Jan 11 '21 01:01 AstraLuma