{"action":"created","issue":{"url":"https://api.github.com/repos/heartsucker/node-deb/issues/28","repository_url":"https://api.github.com/repos/heartsucker/node-deb","labels_url":"https://api.github.com/repos/heartsucker/node-deb/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/heartsucker/node-deb/issues/28/comments","events_url":"https://api.github.com/repos/heartsucker/node-deb/issues/28/events","html_url":"https://github.com/heartsucker/node-deb/issues/28","id":187270972,"number":28,"title":"Feature request: Be able to set owner of directories","user":{"login":"tarjei","id":211263,"avatar_url":"https://avatars.githubusercontent.com/u/211263?v=3","gravatar_id":"","url":"https://api.github.com/users/tarjei","html_url":"https://github.com/tarjei","followers_url":"https://api.github.com/users/tarjei/followers","following_url":"https://api.github.com/users/tarjei/following{/other_user}","gists_url":"https://api.github.com/users/tarjei/gists{/gist_id}","starred_url":"https://api.github.com/users/tarjei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarjei/subscriptions","organizations_url":"https://api.github.com/users/tarjei/orgs","repos_url":"https://api.github.com/users/tarjei/repos","events_url":"https://api.github.com/users/tarjei/events{/privacy}","received_events_url":"https://api.github.com/users/tarjei/received_events","type":"User","site_admin":false},"labels":[{"id":254068509,"url":"https://api.github.com/repos/heartsucker/node-deb/labels/feature","name":"feature","color":"009800","default":false},{"id":254068525,"url":"https://api.github.com/repos/heartsucker/node-deb/labels/wontfix","name":"wontfix","color":"bfd4f2","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-04T07:41:45Z","updated_at":"2016-11-04T10:07:21Z","closed_at":"2016-11-04T10:01:57Z","body":"Hi, great package!\r\n\r\nIt would be really swell to have a simple way to chown all or some directories to the installing user so that tmp dirs etc can be setup within the package.\r\n\r\nRegards,\r\nTarjei"},"comment":{"url":"https://api.github.com/repos/heartsucker/node-deb/issues/comments/258389280","html_url":"https://github.com/heartsucker/node-deb/issues/28#issuecomment-258389280","issue_url":"https://api.github.com/repos/heartsucker/node-deb/issues/28","id":258389280,"user":{"login":"tarjei","id":211263,"avatar_url":"https://avatars.githubusercontent.com/u/211263?v=3","gravatar_id":"","url":"https://api.github.com/users/tarjei","html_url":"https://github.com/tarjei","followers_url":"https://api.github.com/users/tarjei/followers","following_url":"https://api.github.com/users/tarjei/following{/other_user}","gists_url":"https://api.github.com/users/tarjei/gists{/gist_id}","starred_url":"https://api.github.com/users/tarjei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarjei/subscriptions","organizations_url":"https://api.github.com/users/tarjei/orgs","repos_url":"https://api.github.com/users/tarjei/repos","events_url":"https://api.github.com/users/tarjei/events{/privacy}","received_events_url":"https://api.github.com/users/tarjei/received_events","type":"User","site_admin":false},"created_at":"2016-11-04T10:07:20Z","updated_at":"2016-11-04T10:07:20Z","body":"Good call. I like your suggerstion of using a postinst script.\nT\n\n2016-11-04 11:01 GMT+01:00 heartsucker <notifications@github.com>:\n\n> Hey @tarjei <https://github.com/tarjei>. Thanks for the suggestion, but\n> as I mentioned in #26 <https://github.com/heartsucker/node-deb/issues/26>,\n> I think this will start to add a bit too much to this tool. For example, if\n> you had a directory tree like:\n>\n> /dir\n> |----/sub1\n> |   |----file1.txt\n> |   |----file2.txt\n> |   |----file3.txt\n> |----/sub2\n>     |----fileA.txt\n>     |----fileB.txt\n>     |----fileC.txt\n>\n> The syntax in the node_deb object in package.json would have to be\n> something like:\n>\n> {\n>   \"permissions\": {\n>     \"/var/lib/my-app-name/\": \"0750:my-user:my-group\",\n>     \"/var/lib/my-app-name/dir\": \"0750:my-user:my-group\",\n>     \"/var/lib/my-app-name/dir/sub1\": \"0750:my-user:my-group\",\n>     \"/var/lib/my-app-name/dir/sub1/file1\": \"0640:my-user:my-group\",\n>     ...\n>   }\n> }\n>\n> While itself not hard to implement, this would bloat the package.json and\n> I don't think anything beyond basic Debian packing should be a first class\n> feature of node-deb.\n>\n> However, because of the --template-postinst flag, you could override the\n> default postinst script that is run on package installation and include a\n> series of chown and chmod commands to handle your specific needs.\n>\n> I also think this job of permissions is best handled by a tool like\n> ansible or chef, so when we've used this, the workflow has been something\n> like:\n>\n>    1. Build Debian package via CI tool\n>    2. Push to Debian repo\n>    3. Trigger deployment scripts\n>    4. Configure server, install .deb, configure some more\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/heartsucker/node-deb/issues/28#issuecomment-258388208>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/AAM5P42WMX3rBr7c2DAmlm-r4Ci4LnjIks5q6wKWgaJpZM4KpQ9h>\n> .\n>\n\n\n\n-- \n__________________\nTarjei Huse\nMobil: 920 63 413\n"}}
{"actor":{"display_login":"tarjei"}}