Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1388145 - katello-backup changes ownership of existing directories when used as destination.
katello-backup changes ownership of existing directories when used as destina...
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Backup & Restore (Show other bugs)
6.2.2
All Linux
low Severity urgent (vote)
: 6.2.9
: Unused
Assigned To: Christine Fouant
Peter Ondrejka
: PrioBumpField, Triaged
Depends On: 1377636
Blocks: 1353215 1426396
  Show dependency treegraph
 
Reported: 2016-10-24 11:07 EDT by Martijn ten Heuvel
Modified: 2017-05-01 09:55 EDT (History)
8 users (show)

See Also:
Fixed In Version: katello-3.0.0-17
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1426396 (view as bug list)
Environment:
Last Closed: 2017-05-01 09:55:35 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Bugzilla 1377636 None None None 2017-02-03 14:25 EST
Red Hat Product Errata RHBA-2017:1191 normal SHIPPED_LIVE Satellite 6.2.9 Async Bug Release 2017-05-01 13:49:42 EDT

  None (edit)
Description Martijn ten Heuvel 2016-10-24 11:07:15 EDT
Description of problem:
When running katello-backup /var/tmp (example) it changes ownership & rights of that directory

Version-Release number of selected component (if applicable):
[root@satellite62 virt-who.d]# yum provides /bin/katello-backup
Loaded plugins: product-id, search-disabled-repos, subscription-manager
katello-common-3.0.0-13.el7sat.noarch : Common runtime components of katello
Repo        : @rhel-7-server-satellite-6.2-rpms
Matched from:
Filename    : /bin/katello-backup

How reproducible:
100%

Steps to Reproduce:
1. login to satellite62 server.
2. become root
3. run katello-backup --skip-pulp-content /var/tmp

Actual results:
Ownership of /var/tmp is changed to: 
drwxrwx---. 2 root          postgres    

which consequently breaks the startup of foreman-tasks

Expected results:
Don't change ownership of existing directories.

Additional info:
Suggested solution:
- Don't change ownership.
- If cared about ownership for some reason, fail with suggestion on ownership and/or creation of a new directory
Comment 3 Christine Fouant 2017-02-03 14:25:23 EST
The solution for https://bugzilla.redhat.com/show_bug.cgi?id=1377636 solves this issue.
Comment 5 pm-sat@redhat.com 2017-02-23 16:09:48 EST
Please add verifications steps for this bug to help QE verify
Comment 6 Christine Fouant 2017-03-22 09:26:35 EDT
Verification steps:

- Choose an existing directory to back up to (i.e. /tmp/backup), look at its ownership values
- Create a backup as root pointing at that existing directory (i.e. # katello-backup /tmp/backup)
- Verify the existing directory has its original ownership values (i.e. /tmp/backup ownership has not changed since the backup initiated)
Comment 7 Peter Ondrejka 2017-03-24 08:35:37 EDT
Verified on Sat 6.2.9-1, as katello-backup now dumps data into a subdirectory, the destination's ownership is not altered. Checked with /var/tmp:

~]# ll /var
drwxrwxrwt.  4 root root  4096 Mar 24 08:19 tmp
...

~]# katello-backup --skip-pulp-content /var/tmp
...


~]# ll /var
drwxrwxrwt.  5 root root  4096 Mar 24 08:23 tmp

 ~]# ll /var/tmp
drwxrwx---. 2 root postgres 4096 Mar 24 08:23 katello-backup-2017-03-24T08:22:33-04:00
Comment 9 errata-xmlrpc 2017-05-01 09:55:35 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:1191

Note You need to log in before you can comment on or make changes to this bug.