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

 
 

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

Submitted by:  A. Peter Allan <alwynallan>
Submitted on:  Thu Feb 25 17:31:54 2010  
 
Severity: 3 - NormalStatus: Fixed
Assigned to: Benno Schulenberg <bens>Open/Closed: Closed

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri Jul 22 15:36:38 2016, 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 Jul 22 15:09:16 2016, comment #4:

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

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Sat Jun 14 16:29:32 2014, comment #3:

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

Benno Schulenberg <bens>
Project AdministratorIn charge of this item.
Fri Sep 27 11:13:38 2013, 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>
Project AdministratorIn charge of this item.
Mon Jun 27 21:05:14 2011, comment #1:

Does using sudoedit instead make any difference?

Ryan Lothian <ryanlothian>
Thu Feb 25 17:31:54 2010, 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.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri Jul 22 15:09:16 2016bensStatusWont 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
    Sat Jun 14 16:29:32 2014bensStatusNone=>Wont Fix
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup