Need better way of handling permissions with nano and sudo mix
Bug #72995 reported by
encompass
This bug report is a duplicate of:
Bug #58002: Some programs create root-owned files in user $HOME when run under sudo.
Edit
Remove
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nano (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
After using sudo with nano which is pretty common, I get...
failed to open "/home/
I figure this is because the root account when used with sudo makes this file inaccessible for normal use. I use nano with and without sudo and having to press enter for this is annoying. Is there some work around for this?
I could be locked for obvious security reasons. But there has to be a better way.
Changed in nano: | |
status: | Unconfirmed → Confirmed |
To post a comment you must log in.
Same problem here.
I figred out two ways to work around this problem:
1) delete .nano_history (since the file doesn't exist, nano is able to create it using the user's rights. I don't know about any bad consequences this might have?)
2) change .nano_history's permissions (for some strange reason I am unable to reproduce this behavior while writing this...)
It should be possible to do both using a cron job - but there should be a better way?