#6436 ipautil.backup_file performs move operation ofn the files instead of copying them
Closed: duplicate 5 years ago by rcritten. Opened 7 years ago by mbabinsk.

ipautil.backup_file function sees ample use in the service installer code. Its implementation, however, is rather unfortunate: it does move the respective file to a backup, destroying the original in the process.

This means that all attributes and SELinux labels are lost and the caller of this function must constantly re-create the original perms/labels after modifications.

We should create a backup copy of the file instead so that the attributes of the original are preserved in the modified version.


  • pspacek: part of installer refactoring, I guess
  • mbabinsk: not really since we found out that some stuff actually relies no this behavior

Metadata Update from @mbabinsk:
- Issue assigned to mbabinsk
- Issue set to the milestone: FreeIPA 4.5 backlog

7 years ago

Metadata Update from @rcritten:
- Issue close_status updated to: duplicate
- Issue status updated to: Closed (was: Open)

5 years ago

Login to comment on this ticket.

Metadata