bugGNU nano - Bugs: bug #58383, backup files always have the...

 
 

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

bug #58383: backup files always have the user's standard group

Submitter:  Benno Schulenberg <bens>
Submitted:  Sun 17 May 2020 05:47:07 PM UTC
   
 
Severity:  2 - Minor Status:  Fixed
Assigned to:  bens Open/Closed:  Closed

Sun 24 May 2020 05:27:03 PM UTC, comment #2: 

Fixed in git, commit 5449d1e6, by simply ignoring the return value of fchown().

Benno Schulenberg <bens>
Group administrator
Sun 17 May 2020 06:39:23 PM UTC, comment #1: 

Ehm... writing the backup file happens only after chowning and chmodding the backup's file descriptor, so we don't know yet whether writing will succeed.  :|

Benno Schulenberg <bens>
Group administrator
Sun 17 May 2020 05:47:07 PM UTC, original submission:  

To reproduce, grep for your user name in /etc/group.  Pick one of the groups that you are a member of (for example: cdrom) and do: 'chown :cdrom README'.  Do 'ls -l README' to see that the file is now indeed in the cdrom group.

Now run 'src/nano README xxx ^S ^X', and do 'ls -l READ*'.  See that the README file is still in the cdrom group, but the README~ backup file is not.  This is not a big deal, because one almost never makes use of a backup file.  But, if one needs it, it is not right that the file does not have the correct group.

This is basically the same as bug #29514, and is related to bug #29732.  I think that the reporters of those bugs are right: nano should ignore any errors from chown() and chmod() on the backup file: the backup file has been written successfully, and that probably means that the file itself can be written successfully too.  Because: apparently writing seems to work fine, it's just chowning and/or chmodding that don't succeed.  But... for the file itself we don't use chown() nor chmod(), so... go ahead, write!

Benno Schulenberg <bens>
Group administrator

 

(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 (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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-07-30 bens Open/ClosedOpen Closed
    2020-05-24 bens StatusNone Fixed
    2020-05-20 bens Assigned toNone bens

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code