{"action":"created","issue":{"url":"https://api.github.com/repos/haugene/docker-transmission-openvpn/issues/13","labels_url":"https://api.github.com/repos/haugene/docker-transmission-openvpn/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/haugene/docker-transmission-openvpn/issues/13/comments","events_url":"https://api.github.com/repos/haugene/docker-transmission-openvpn/issues/13/events","html_url":"https://github.com/haugene/docker-transmission-openvpn/issues/13","id":77328421,"number":13,"title":"Data file permissions","user":{"login":"amishb","id":3438974,"avatar_url":"https://avatars.githubusercontent.com/u/3438974?v=3","gravatar_id":"","url":"https://api.github.com/users/amishb","html_url":"https://github.com/amishb","followers_url":"https://api.github.com/users/amishb/followers","following_url":"https://api.github.com/users/amishb/following{/other_user}","gists_url":"https://api.github.com/users/amishb/gists{/gist_id}","starred_url":"https://api.github.com/users/amishb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amishb/subscriptions","organizations_url":"https://api.github.com/users/amishb/orgs","repos_url":"https://api.github.com/users/amishb/repos","events_url":"https://api.github.com/users/amishb/events{/privacy}","received_events_url":"https://api.github.com/users/amishb/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/haugene/docker-transmission-openvpn/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-05-17T15:08:50Z","updated_at":"2015-05-21T17:42:40Z","closed_at":null,"body":"The newly created torrent directory will be stored on the host with a permission of 644 and as root:root.\r\n\r\nCan this be configured to allow me to pass my user and group into the container, so that when writing the torrent, it will write correctly to my host file system, removing the need for my to use sudo to change the configuration. \r\n\r\nI have a script which moves and sorts these files, and I don't want to elevate the scripts privileges, as this can be done in the container.\r\n\r\nThanks "},"comment":{"url":"https://api.github.com/repos/haugene/docker-transmission-openvpn/issues/comments/104368664","html_url":"https://github.com/haugene/docker-transmission-openvpn/issues/13#issuecomment-104368664","issue_url":"https://api.github.com/repos/haugene/docker-transmission-openvpn/issues/13","id":104368664,"user":{"login":"haugene","id":1038094,"avatar_url":"https://avatars.githubusercontent.com/u/1038094?v=3","gravatar_id":"","url":"https://api.github.com/users/haugene","html_url":"https://github.com/haugene","followers_url":"https://api.github.com/users/haugene/followers","following_url":"https://api.github.com/users/haugene/following{/other_user}","gists_url":"https://api.github.com/users/haugene/gists{/gist_id}","starred_url":"https://api.github.com/users/haugene/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haugene/subscriptions","organizations_url":"https://api.github.com/users/haugene/orgs","repos_url":"https://api.github.com/users/haugene/repos","events_url":"https://api.github.com/users/haugene/events{/privacy}","received_events_url":"https://api.github.com/users/haugene/received_events","type":"User","site_admin":false},"created_at":"2015-05-21T17:42:40Z","updated_at":"2015-05-21T17:42:40Z","body":"Turns out I did it with uname and g+s stuff before, while I now run post processing in another Docker container, so it's also root:root. Anyways, googling this I end up at this issue: https://github.com/docker/docker/issues/7198\r\n\r\nMaybe you can try what jjrv suggested, although it's supposed to have a performance hit. For post-processing torrents it might be ok though.\r\n>I hacked around this in Ubuntu outside Docker. Install package bindfs and bind the directory with volume contents to another path while mapping UID and GID to ones used inside the container:\r\n>\r\n>sudo bindfs -u UID -g GID oldpath newpath\r\n>\r\n>Then use newpath as a docker volume. Oldpath still shows ownership correct for the host, newpath for the guest."}}