{"action":"opened","issue":{"url":"https://api.github.com/repos/hossbeast/fab/issues/55","labels_url":"https://api.github.com/repos/hossbeast/fab/issues/55/labels{/name}","comments_url":"https://api.github.com/repos/hossbeast/fab/issues/55/comments","events_url":"https://api.github.com/repos/hossbeast/fab/issues/55/events","html_url":"https://github.com/hossbeast/fab/issues/55","id":56146303,"number":55,"title":"fab - enhancements to the ipc mechanism","user":{"login":"hossbeast","id":2608815,"avatar_url":"https://avatars.githubusercontent.com/u/2608815?v=3","gravatar_id":"","url":"https://api.github.com/users/hossbeast","html_url":"https://github.com/hossbeast","followers_url":"https://api.github.com/users/hossbeast/followers","following_url":"https://api.github.com/users/hossbeast/following{/other_user}","gists_url":"https://api.github.com/users/hossbeast/gists{/gist_id}","starred_url":"https://api.github.com/users/hossbeast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hossbeast/subscriptions","organizations_url":"https://api.github.com/users/hossbeast/orgs","repos_url":"https://api.github.com/users/hossbeast/repos","events_url":"https://api.github.com/users/hossbeast/events{/privacy}","received_events_url":"https://api.github.com/users/hossbeast/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"hossbeast","id":2608815,"avatar_url":"https://avatars.githubusercontent.com/u/2608815?v=3","gravatar_id":"","url":"https://api.github.com/users/hossbeast","html_url":"https://github.com/hossbeast","followers_url":"https://api.github.com/users/hossbeast/followers","following_url":"https://api.github.com/users/hossbeast/following{/other_user}","gists_url":"https://api.github.com/users/hossbeast/gists{/gist_id}","starred_url":"https://api.github.com/users/hossbeast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hossbeast/subscriptions","organizations_url":"https://api.github.com/users/hossbeast/orgs","repos_url":"https://api.github.com/users/hossbeast/repos","events_url":"https://api.github.com/users/hossbeast/events{/privacy}","received_events_url":"https://api.github.com/users/hossbeast/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/hossbeast/fab/milestones/2","labels_url":"https://api.github.com/repos/hossbeast/fab/milestones/2/labels","id":388191,"number":2,"title":"v0.5.0","description":"Main features in v0.5.0\r\n - redesigned listwise syntax (breaking change)\r\n - fab caching daemon\r\n\r\n","creator":{"login":"hossbeast","id":2608815,"avatar_url":"https://avatars.githubusercontent.com/u/2608815?v=3","gravatar_id":"","url":"https://api.github.com/users/hossbeast","html_url":"https://github.com/hossbeast","followers_url":"https://api.github.com/users/hossbeast/followers","following_url":"https://api.github.com/users/hossbeast/following{/other_user}","gists_url":"https://api.github.com/users/hossbeast/gists{/gist_id}","starred_url":"https://api.github.com/users/hossbeast/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hossbeast/subscriptions","organizations_url":"https://api.github.com/users/hossbeast/orgs","repos_url":"https://api.github.com/users/hossbeast/repos","events_url":"https://api.github.com/users/hossbeast/events{/privacy}","received_events_url":"https://api.github.com/users/hossbeast/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":13,"state":"open","created_at":"2013-07-27T03:07:06Z","updated_at":"2015-02-01T00:39:46Z","due_on":"2015-01-31T07:00:00Z","closed_at":null},"comments":0,"created_at":"2015-02-01T00:39:46Z","updated_at":"2015-02-01T00:39:46Z","closed_at":null,"body":"# Summary\r\n\r\nthis idiom is broken\r\n\r\n``` fab ; sudo fab @install ```\r\n\r\n# Background\r\n\r\nprocess layout, with the fabd daemon\r\n\r\n```\r\nfabw            <-- can be root or normal user\r\n \\- fabd        <-- same user as fabw\r\n\r\nfab             <-- unrelated process ; can be root or normal user\r\n```\r\n\r\nIt is legitimate to run fab as root, such as when installing, because you need root permissions to modify those files/directories\r\n\r\nThe first time you run fab, fabw and fabd are created as the user who ran the fab command ; this can be either root or a normal user.\r\n\r\nSubsequent executions of fab can likewise either be root or a normal user.\r\n\r\nI would like all of this to be transparent to the user. Use whatever user makes sense for the files that the commands you are going to be executing will be modifying.\r\n\r\nHowever, this creates problems for ipc, because under linux processes of different users can normally not send signals to one another.\r\n\r\nThere are a few ipc mechanisms in place right now.\r\n\r\n- build info is communicated via the files in /var/tmp/fab (world-read/write)\r\n- fabd open()s /proc/<pid of fab>/fd/1 to write log messages\r\n- fab and fabd exchange signals to coordinate the build process\r\n\r\nThe second two points break when one of the users is root, and the other is not.\r\n\r\n# Ideas\r\n\r\nAll of these executables need to be fabsys:fabsys and ug+s. I believe this will fix the signal-exchange problem. (This complicates the install though, because valgrind cannot execute setid/setgid binaries. So disabled for debug).\r\n\r\nThe logging issue remains."}}