{"action":"closed","issue":{"url":"https://api.github.com/repos/shelljs/shelljs/issues/246","labels_url":"https://api.github.com/repos/shelljs/shelljs/issues/246/labels{/name}","comments_url":"https://api.github.com/repos/shelljs/shelljs/issues/246/comments","events_url":"https://api.github.com/repos/shelljs/shelljs/issues/246/events","html_url":"https://github.com/shelljs/shelljs/issues/246","id":112322295,"number":246,"title":"By default shelljs runs command in root ","user":{"login":"Lakshman-LD","id":6481030,"avatar_url":"https://avatars.githubusercontent.com/u/6481030?v=3","gravatar_id":"","url":"https://api.github.com/users/Lakshman-LD","html_url":"https://github.com/Lakshman-LD","followers_url":"https://api.github.com/users/Lakshman-LD/followers","following_url":"https://api.github.com/users/Lakshman-LD/following{/other_user}","gists_url":"https://api.github.com/users/Lakshman-LD/gists{/gist_id}","starred_url":"https://api.github.com/users/Lakshman-LD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lakshman-LD/subscriptions","organizations_url":"https://api.github.com/users/Lakshman-LD/orgs","repos_url":"https://api.github.com/users/Lakshman-LD/repos","events_url":"https://api.github.com/users/Lakshman-LD/events{/privacy}","received_events_url":"https://api.github.com/users/Lakshman-LD/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-20T09:20:04Z","updated_at":"2015-12-28T14:20:47Z","closed_at":"2015-12-28T14:20:47Z","body":"Usually working with the Linux systems, working within specific user is more probable. So, shelljs can execute commands on particular user instead of executing in the root. \r\n\r\nI agree that user can be changed using **su** but **su**asks for a password. So non-interactive scripts must be used to change user. So many complications. \r\n\r\nSo it is better that shelljs executes command on a user from where it was called else provide some function to change user provided the Password. "}}