Project

General

Profile

Actions

Bug #18331

closed

When katello-backup is stored on NFS share exported with the root_squash option it fails on chown operation

Added by Christine Fouant about 7 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Backup & Restore
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1415949

Description of problem:

When katello-backup is stored on NFS share exported with the root_squash option it fails on chown operation.

This means that for the destination directory, where the backup will be finally saved, the user creating the backup is no longer root, it is user nobody. Therefore, in the way you are running the backup, it is run by root as far as reading files from the system is concerned, but when it comes to writing files to the destination directory, the user is "squashed" to nobody.

Version-Release number of selected component (if applicable):

Satellite 6.2.x

How reproducible: 100%

Steps to Reproduce:
1. Setup NFS share with root_squash option
2. Call katello-backup on that directory
3. # katello-backup --online-backup /mnt/backup/20170103-root
Creating backup folder /mnt/backup/20170103-root
/usr/share/ruby/fileutils.rb:1341:in `chown': Operation not permitted - /mnt/backup/20170103-root (Errno::EPERM)
from /usr/share/ruby/fileutils.rb:1341:in `chown'
from /usr/share/ruby/fileutils.rb:1034:in `block in chown'
from /usr/share/ruby/fileutils.rb:1033:in `each'
from /usr/share/ruby/fileutils.rb:1033:in `chown'
from /bin/katello-backup:48:in `<main>'

Actual results:

As seen above.

Expected results:

Backup taken successfully.

Additional info:

When commenting chown operation in katello-backup and katello-restore backup was taken and restored successfully.

katello-backup

~~
46 FileUtils.mkdir_p(@dir)
47 puts "Creating backup folder #{@dir}"
48 # FileUtils.chown(nil, 'postgres', @dir)
49 FileUtils.chmod 0770, @dir
50 FileUtils.cd @dir
~~

katello-restore

~~
19 def restore
20 puts "#{DIR}"
21 # FileUtils.chown(nil, 'postgres', DIR)
22 Dir.chdir(DIR)
~~

Actions #1

Updated by Christine Fouant about 7 years ago

  • Project changed from Katello to Packaging
  • Category deleted (Backup & Restore)
Actions #2

Updated by Eric Helms about 7 years ago

  • Project changed from Packaging to Katello
Actions #3

Updated by Justin Sherrill about 7 years ago

  • Category set to Backup & Restore
  • translation missing: en.field_release set to 114
Actions #4

Updated by Christine Fouant almost 6 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF