{"action":"created","issue":{"url":"https://api.github.com/repos/rfjakob/gocryptfs/issues/64","repository_url":"https://api.github.com/repos/rfjakob/gocryptfs","labels_url":"https://api.github.com/repos/rfjakob/gocryptfs/issues/64/labels{/name}","comments_url":"https://api.github.com/repos/rfjakob/gocryptfs/issues/64/comments","events_url":"https://api.github.com/repos/rfjakob/gocryptfs/issues/64/events","html_url":"https://github.com/rfjakob/gocryptfs/issues/64","id":191840562,"number":64,"title":"unix domain sockets are created with the wrong owner","user":{"login":"redneb","id":382627,"avatar_url":"https://avatars.githubusercontent.com/u/382627?v=3","gravatar_id":"","url":"https://api.github.com/users/redneb","html_url":"https://github.com/redneb","followers_url":"https://api.github.com/users/redneb/followers","following_url":"https://api.github.com/users/redneb/following{/other_user}","gists_url":"https://api.github.com/users/redneb/gists{/gist_id}","starred_url":"https://api.github.com/users/redneb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redneb/subscriptions","organizations_url":"https://api.github.com/users/redneb/orgs","repos_url":"https://api.github.com/users/redneb/repos","events_url":"https://api.github.com/users/redneb/events{/privacy}","received_events_url":"https://api.github.com/users/redneb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-27T03:48:27Z","updated_at":"2016-11-29T00:58:47Z","closed_at":null,"body":"Suppose that you are running `gocryptfs` as root with the `-allow_other` option. Then if a non-root user creates a (regular) file in the `gocryptfs`, it will be owned by that user. But that doesn't seem to happen with unix domain sockets, they are instead always owned by root.\r\n\r\nHere's how to reproduce this (with the help of `socat`):\r\nAs root, run the following:\r\n\r\n    mkdir /tmp/gocryptfs-sock-test{,.enc}\r\n    gocryptfs -init -extpass=\"echo test\" /tmp/gocryptfs-sock-test.enc\r\n    gocryptfs -allow_other -extpass=\"echo test\" /tmp/gocryptfs-sock-test{.enc,}\r\n    chmod 0777 /tmp/gocryptfs-sock-test\r\n\r\nThen as a non-root user run this:\r\n\r\n    socat unix-listen:/tmp/gocryptfs-sock-test/test.sock -\r\n    \r\nYou can check now that the socket `/tmp/gocryptfs-sock-test/test.sock` will be owned by root.\r\n\r\n`encfs` with the `--public` option, doesn't seem to have that problem:\r\n\r\n    # as root:\r\n    mkdir /tmp/encfs-sock-test{,.enc}\r\n    encfs --public --standard --extpass=\"echo test\" /tmp/encfs-sock-test{.enc,}\r\n    chmod 0777 /tmp/encfs-sock-test\r\n    \r\n    # as non-root:\r\n    socat unix-listen:/tmp/encfs-sock-test/test.sock -\r\n    # /tmp/encfs-sock-test/test.sock is owned by the non root user\r\n"},"comment":{"url":"https://api.github.com/repos/rfjakob/gocryptfs/issues/comments/263444278","html_url":"https://github.com/rfjakob/gocryptfs/issues/64#issuecomment-263444278","issue_url":"https://api.github.com/repos/rfjakob/gocryptfs/issues/64","id":263444278,"user":{"login":"redneb","id":382627,"avatar_url":"https://avatars.githubusercontent.com/u/382627?v=3","gravatar_id":"","url":"https://api.github.com/users/redneb","html_url":"https://github.com/redneb","followers_url":"https://api.github.com/users/redneb/followers","following_url":"https://api.github.com/users/redneb/following{/other_user}","gists_url":"https://api.github.com/users/redneb/gists{/gist_id}","starred_url":"https://api.github.com/users/redneb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/redneb/subscriptions","organizations_url":"https://api.github.com/users/redneb/orgs","repos_url":"https://api.github.com/users/redneb/repos","events_url":"https://api.github.com/users/redneb/events{/privacy}","received_events_url":"https://api.github.com/users/redneb/received_events","type":"User","site_admin":false},"created_at":"2016-11-29T00:58:46Z","updated_at":"2016-11-29T00:58:46Z","body":"It now works like a charm. Thanks for the quick fix."}}
{"actor":{"display_login":"redneb"}}