This has been addressed in nano's SVN, r5580. In version 2.5.2 and higher, nano will ignore $HOME when it is effectively running as root, and will therefore not create or change anything in the home directory of the user that invokes nano through a plain sudo.
(It also means that it will not use the normal user's .nanorc, but only the global /etc/nanorc plus the .nanorc file in /root. Which is kind of nice, because you can then give a root-privileged nano another appearance from that of a normal user, by using for example 'set titlecolor brightwhite,red'.) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1471459 Title: First run of nano creates a directory in $HOME, if run as sudo will be root owned To manage notifications about this bug go to: https://bugs.launchpad.net/hundredpapercuts/+bug/1471459/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs