{"action":"created","issue":{"url":"https://api.github.com/repos/robbyrussell/oh-my-zsh/issues/4992","repository_url":"https://api.github.com/repos/robbyrussell/oh-my-zsh","labels_url":"https://api.github.com/repos/robbyrussell/oh-my-zsh/issues/4992/labels{/name}","comments_url":"https://api.github.com/repos/robbyrussell/oh-my-zsh/issues/4992/comments","events_url":"https://api.github.com/repos/robbyrussell/oh-my-zsh/issues/4992/events","html_url":"https://github.com/robbyrussell/oh-my-zsh/issues/4992","id":147347574,"number":4992,"title":"upgrade does not respect $HOME - wrong ownership after upgrade","user":{"login":"chthal","id":1464574,"avatar_url":"https://avatars.githubusercontent.com/u/1464574?v=3","gravatar_id":"","url":"https://api.github.com/users/chthal","html_url":"https://github.com/chthal","followers_url":"https://api.github.com/users/chthal/followers","following_url":"https://api.github.com/users/chthal/following{/other_user}","gists_url":"https://api.github.com/users/chthal/gists{/gist_id}","starred_url":"https://api.github.com/users/chthal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chthal/subscriptions","organizations_url":"https://api.github.com/users/chthal/orgs","repos_url":"https://api.github.com/users/chthal/repos","events_url":"https://api.github.com/users/chthal/events{/privacy}","received_events_url":"https://api.github.com/users/chthal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-04-11T08:06:39Z","updated_at":"2016-09-25T06:20:33Z","closed_at":null,"body":"Hello,\r\n\r\nthank you for that great piece of software, I use it on all my computers!\r\n\r\nOne issue that occurs often, is that an upgrade does not respect $HOME. I always have a couple of opened screen sessions on my computers. Often I log in as user, then do a \r\nsudo /bin/zsh\r\n to become root but then stay in \r\n/home/user #\r\n(I do not change directory) and logout. Now root is in \"/home/user #\". The session remains open. If I do a login a couple of days later, oh-my-zsh prompts for an update and – if YES – upgrades the installation in /home/user as root giving the files wrong permissions.\r\n\r\nInstead upgrade.sh should respect $HOME and look, if there are changes in it's  installation in the homedir of the current user and upgrade that.\r\n"},"comment":{"url":"https://api.github.com/repos/robbyrussell/oh-my-zsh/issues/comments/249405224","html_url":"https://github.com/robbyrussell/oh-my-zsh/issues/4992#issuecomment-249405224","issue_url":"https://api.github.com/repos/robbyrussell/oh-my-zsh/issues/4992","id":249405224,"user":{"login":"chthal","id":1464574,"avatar_url":"https://avatars.githubusercontent.com/u/1464574?v=3","gravatar_id":"","url":"https://api.github.com/users/chthal","html_url":"https://github.com/chthal","followers_url":"https://api.github.com/users/chthal/followers","following_url":"https://api.github.com/users/chthal/following{/other_user}","gists_url":"https://api.github.com/users/chthal/gists{/gist_id}","starred_url":"https://api.github.com/users/chthal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chthal/subscriptions","organizations_url":"https://api.github.com/users/chthal/orgs","repos_url":"https://api.github.com/users/chthal/repos","events_url":"https://api.github.com/users/chthal/events{/privacy}","received_events_url":"https://api.github.com/users/chthal/received_events","type":"User","site_admin":false},"created_at":"2016-09-25T06:20:33Z","updated_at":"2016-09-25T06:20:33Z","body":"Thanks for sudo -s :-). No, I don't need, but I like to and usually let my screen sessions open. I login as $User and have configured my .bash_profile and .zprofile so that an existing screen session is re-entered after login or a new one is created:\r\n\r\nif [ \"$TERM\" != \"screen\" ] && [ \"$SSH_CONNECTION\" != \"\" ]; then\r\n        /usr/bin/screen -U -S sshscreen -d -R && exit\r\nfi\r\n\r\nAt each moment of the screen session I can logout with Ctrl-A-D and reenter the existing screen session with ssh login again. I always come back to the place where I left ... I like that.\r\n\r\nOk here's a session like that:\r\n\r\nuser@server ~ »\r\nuser@server ~ » I just entered\r\nuser@server ~ » echo $HOME\r\n/home/user\r\nuser@server ~ » sudo -s\r\nroot@server /home/user # echo $HOME\r\n/root\r\nroot@server /home/user #\r\nroot@server /home/user # now I leave with Ctrl-A-D\r\nroot@server /home/user # now I am back here again :-)\r\nroot@server /home/user # echo $HOME\r\n/root\r\nroot@server /home/user #\r\n\r\nSo $HOME is always correct. But if I enter after a while and left the session in this state:\r\nroot@server /home/user #\r\n\r\nThen oh-my-zsh prompts for an update and – if YES – upgrades the installation in /home/user as root."}}
{"actor":{"display_login":"chthal"}}