bugGNU nano - Bugs: bug #29008, if first use of nano is under...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #29008: if first use of nano is under sudo, it leaves unreadable file in user home

Submitter:  A. Peter Allan <alwynallan>
Submitted:  Thu 25 Feb 2010 05:31:54 PM UTC
   
 
Severity:  3 - Normal Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Fri 22 Jul 2016 03:36:38 PM UTC, comment #5: 

Awesome! I can't be the only person who had to type "nano junk" on every new system and save a junk file, just to avoid this problem.

A. Peter Allan <alwynallan>
Fri 22 Jul 2016 03:09:16 PM UTC, comment #4: 

This was finally fixed (in a different manner) half a year ago, in git commit 3a3b176.

Benno Schulenberg <bens>
Group administrator
Sat 14 Jun 2014 04:29:32 PM UTC, comment #3: 

As noted in comment #2, I think it is not nano's task to manage permissions.

Benno Schulenberg <bens>
Group administrator
Fri 27 Sep 2013 11:13:38 AM UTC, comment #2: 

Indeed, using 'sudoedit <file>' or 'sudo -e nano <file>' does the right thing.  I don't think it is nano's job to notice that it has been (or might have been) invoked via sudo.  It is the user's task to invoke the appropriate command, one that doesn't have unwanted side effects.

Benno Schulenberg <bens>
Group administrator
Mon 27 Jun 2011 09:05:14 PM UTC, comment #1: 

Does using sudoedit instead make any difference?

Ryan Lothian <ryanlothian>
Thu 25 Feb 2010 05:31:54 PM UTC, original submission:  

After a system install I often "sudo nano /etc/fstab" for example. That drops .nano_history in my home directory with root ownership and rw------- permissions. Subsequent use of nano as user issues a warning before start.

It would be better to chmod the file to $SUDO_USER environment variable if it exists.

A. Peter Allan <alwynallan>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bens (Posted a comment)
  • -email is unavailable- added by ryanlothian (Posted a comment)
  • -email is unavailable- added by alwynallan (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-07-22 bens StatusWont Fix Fixed
        Assigned toNone bens
        SummaryIf first use of nano is under sudo, it leaves unreadable file in user home. if first use of nano is under sudo, it leaves unreadable file in user home
    2014-06-14 bens StatusNone Wont Fix
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code