sudo doesn't change permissions on pseudo term which breaks screen
Bug #247163 reported by
Matthew Caron
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
sudo (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
When I do:
sudo -u testacct screen bash
I get:
Cannot open your terminal '/dev/pts/3' - please check.
This makes sense, because testacct doesn't own /dev/pts/3.
My thought on how to fix this would be to have sudo change the permissions of /dev/pts/3 so that it is owned by testacct.
To post a comment you must log in.
If sudo would chown the terminal, then the original user couldn't access it any more, which would be much worse. Realistically this is an inherent design decision in Linux' terminal system and won't change anytime soon.
Usually you should first start screen and then sudo in that.