{"action":"created","issue":{"url":"https://api.github.com/repos/bazil/fuse/issues/100","labels_url":"https://api.github.com/repos/bazil/fuse/issues/100/labels{/name}","comments_url":"https://api.github.com/repos/bazil/fuse/issues/100/comments","events_url":"https://api.github.com/repos/bazil/fuse/issues/100/events","html_url":"https://github.com/bazil/fuse/issues/100","id":92104967,"number":100,"title":"Uid, Gid and Pid wrongly (?) set to zero in fuse.ReleaseRequest on Ubuntu","user":{"login":"airnandez","id":813479,"avatar_url":"https://avatars.githubusercontent.com/u/813479?v=3","gravatar_id":"","url":"https://api.github.com/users/airnandez","html_url":"https://github.com/airnandez","followers_url":"https://api.github.com/users/airnandez/followers","following_url":"https://api.github.com/users/airnandez/following{/other_user}","gists_url":"https://api.github.com/users/airnandez/gists{/gist_id}","starred_url":"https://api.github.com/users/airnandez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/airnandez/subscriptions","organizations_url":"https://api.github.com/users/airnandez/orgs","repos_url":"https://api.github.com/users/airnandez/repos","events_url":"https://api.github.com/users/airnandez/events{/privacy}","received_events_url":"https://api.github.com/users/airnandez/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/bazil/fuse/labels/invalid","name":"invalid","color":"e6e6e6"},{"url":"https://api.github.com/repos/bazil/fuse/labels/type:doc","name":"type:doc","color":"009800"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-06-30T14:11:03Z","updated_at":"2015-07-05T23:24:15Z","closed_at":"2015-07-05T19:05:23Z","body":"Hello,\r\n\r\nwhile developing [clueFS](https://github.com/airnandez/cluefs) I noticed that the request passed by `bazil/fuse` to my implementation of [HandleReleaser](http://godoc.org/bazil.org/fuse/fs#HandleReleaser) interface is not filled in the same way on MacOS X and on Ubuntu.\r\n\r\nOn Ubuntu, the `Uid`, `Gid` and `Pid` fields are set to zero whereas in MacOS X those fields are set to the correct user, group and process ids who called the `close()` system call.\r\n\r\nHere is a quick way to reproduce it using the built-in `hellofs` example:\r\n\r\n1. Add the `Release` function below to `examples/hellofs/hello.go`:\r\n\r\n      ```go\r\n      func (File) Release(ctx context.Context, req *fuse.ReleaseRequest) error {\r\n\t     fmt.Printf(\"req=%#v\\n\", req)\r\n\t     return nil\r\n      }\r\n      ```\r\n* Compile and run `hellofs`:\r\n\r\n   ```bash\r\n    $ hellofs $HOME/mnt\r\n   ````\r\n* In another terminal do: `cat $HOME/mnt/hello`\r\n\r\nOn Ubuntu you get:\r\n\r\n   ```\r\n   req=&fuse.ReleaseRequest{Header:fuse.Header{Conn:(*fuse.Conn)(0xc208052120), ID:0x12, Node:0x2, Uid:0x0, Gid:0x0, Pid:0x0, msg:(*fuse.message)(0xc20803c420)}, Dir:false, Handle:0x1, Flags:0x0, ReleaseFlags:0x0, LockOwner:0x0}\r\n   ```\r\n\r\nOn MacOS X you get:\r\n\r\n   ```\r\n   req=&fuse.ReleaseRequest{Header:fuse.Header{Conn:(*fuse.Conn)(0x208350120), ID:0x9, Node:0x2, Uid:0x1f5, Gid:0x14, Pid:0xcfd2, msg:(*fuse.message)(0x20834f140)}, Dir:false, Handle:0x1, Flags:0x0, ReleaseFlags:0x0, LockOwner:0x0}\r\n   ```\r\n\r\nAs you can see, on Ubuntu you get the fields set to zero: `Uid:0x0, Gid:0x0, Pid:0x0`.\r\n\r\nIn case it matters, here is my testing environment:\r\n\r\n* MacOS X 10.9.5 with OSXFUSE 2.7.5\r\n* Ubuntu 14.04 with fuse 2.9.2-4ubuntu4.14.04.1 (as shown by `dpkg -s fuse`)\r\n\r\nHope this helps."},"comment":{"url":"https://api.github.com/repos/bazil/fuse/issues/comments/118676269","html_url":"https://github.com/bazil/fuse/issues/100#issuecomment-118676269","issue_url":"https://api.github.com/repos/bazil/fuse/issues/100","id":118676269,"user":{"login":"jacobsa","id":202895,"avatar_url":"https://avatars.githubusercontent.com/u/202895?v=3","gravatar_id":"","url":"https://api.github.com/users/jacobsa","html_url":"https://github.com/jacobsa","followers_url":"https://api.github.com/users/jacobsa/followers","following_url":"https://api.github.com/users/jacobsa/following{/other_user}","gists_url":"https://api.github.com/users/jacobsa/gists{/gist_id}","starred_url":"https://api.github.com/users/jacobsa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jacobsa/subscriptions","organizations_url":"https://api.github.com/users/jacobsa/orgs","repos_url":"https://api.github.com/users/jacobsa/repos","events_url":"https://api.github.com/users/jacobsa/events{/privacy}","received_events_url":"https://api.github.com/users/jacobsa/received_events","type":"User","site_admin":false},"created_at":"2015-07-05T23:24:15Z","updated_at":"2015-07-05T23:24:15Z","body":"Haha yeah, I was thinking the same thing about SourceForge. I actually stuck a mirror on GitHub just so I had a good target for links.\r\n\r\nYou're totally right about the ideal; I'm just doing what I can accomplish personally."}}