#7426 DogtagInstance.backup_config creates backup with wrong owner
Closed: fixed 6 years ago Opened 6 years ago by cheimes.

Issue

DogtagInstance.backup_config uses shutil.copy to create a backup of the config file. The function does not retain owner and group, so it creates a backup as user and group root:root. It should keep the ownership of the original config

Solution

Use os.stat to fetch the original uid and git, then os.chown to change the owner of the .ipabkp file. Migration should fix existing backups, too.

See https://pagure.io/dogtagpki/issue/167#comment-496193 for background


Metadata Update from @cheimes:
- Custom field on_review adjusted to https://github.com/freeipa/freeipa/pull/1693

6 years ago

master:

  • 3871fe6 Keep owner when backing up CA.cfg

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

6 years ago

Metadata Update from @pvoborni:
- Issue set to the milestone: FreeIPA 4.7 (was: FreeIPA 4.6)

6 years ago

Login to comment on this ticket.

Metadata