{"action":"opened","issue":{"url":"https://api.github.com/repos/nvbn/thefuck/issues/415","labels_url":"https://api.github.com/repos/nvbn/thefuck/issues/415/labels{/name}","comments_url":"https://api.github.com/repos/nvbn/thefuck/issues/415/comments","events_url":"https://api.github.com/repos/nvbn/thefuck/issues/415/events","html_url":"https://github.com/nvbn/thefuck/issues/415","id":121501370,"number":415,"title":"Simple prepending \"sudo\" is not always helps","user":{"login":"krasovsky-evgeny","id":7040748,"avatar_url":"https://avatars.githubusercontent.com/u/7040748?v=3","gravatar_id":"","url":"https://api.github.com/users/krasovsky-evgeny","html_url":"https://github.com/krasovsky-evgeny","followers_url":"https://api.github.com/users/krasovsky-evgeny/followers","following_url":"https://api.github.com/users/krasovsky-evgeny/following{/other_user}","gists_url":"https://api.github.com/users/krasovsky-evgeny/gists{/gist_id}","starred_url":"https://api.github.com/users/krasovsky-evgeny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krasovsky-evgeny/subscriptions","organizations_url":"https://api.github.com/users/krasovsky-evgeny/orgs","repos_url":"https://api.github.com/users/krasovsky-evgeny/repos","events_url":"https://api.github.com/users/krasovsky-evgeny/events{/privacy}","received_events_url":"https://api.github.com/users/krasovsky-evgeny/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-10T14:44:08Z","updated_at":"2015-12-10T14:44:08Z","closed_at":null,"body":"```bash\r\nuser@machine:/$ mkdir /var/www\r\nmkdir: cannot create directory ‘/var/www’: Permission denied\r\nuser@machine:/$ fuck\r\nsudo mkdir /var/www [enter/↑/↓/ctrl+c]\r\n```\r\nroot is owner of /var/www\r\n\r\n```bash\r\nuser@machine:/$ touch /var/www/1/2/3\r\ntouch: cannot touch ‘/var/www/1/2/3’: No such file or directory\r\nuser@machine:/$ fuck\r\nmkdir -p /var/www/1/2 && touch /var/www/1/2/3 [enter/↑/↓/ctrl+c]\r\n```\r\n\r\nthe command is ok, we have permission error\r\n```bash\r\nmkdir: cannot create directory ‘/var/www/1’: Permission denied\r\nuser@machine:/$ fuck\r\nsudo mkdir -p /var/www/1/2 && touch /var/www/1/2/3 [enter/↑/↓/ctrl+c]\r\ntouch: cannot touch ‘/var/www/1/2/3’: Permission denied\r\n```\r\n\r\npermission error related to touch, but accroding to common pattern (\"sudo + command\") we have double sudo\r\n\r\n```bash\r\nuser@machine:/$ fuck\r\nsudo sudo mkdir -p /var/www/1/2 && touch /var/www/1/2/3 [enter/↑/↓/ctrl+c]\r\ntouch: cannot touch ‘/var/www/1/2/3’: Permission denied\r\n```\r\n\r\n"}}