RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 745017 - Bacula Catalog Backup Failing Due to umask issue in make_catalog_backup.pl script
Summary: Bacula Catalog Backup Failing Due to umask issue in make_catalog_backup.pl sc...
Keywords:
Status: CLOSED DUPLICATE of bug 651780
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: bacula
Version: 6.1
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Lukáš Nykrýn
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-10-11 08:10 UTC by Jason Tingle
Modified: 2011-10-13 08:07 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-10-13 08:07:52 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jason Tingle 2011-10-11 08:10:39 UTC
Description of problem:
The umask on line 92 of the make_catalog_backup.pl script is incorrectly configured.  A mask is set instead of a umask.

my %args = @_;
    umask(0700);
    unlink("$wd/.my.cnf");
    open(MY, ">$wd/.my.cnf")

This should be
    umask(0077)

The backup of the catalog will fail because of this problem.  MySQL will ignore the .my.cnf file create in /var/spool/bacula since it is world writable

[root@nicodemus bacula]# ./make_catalog_backup.pl MyCatalog
Warning: World-writable config file '/var/spool/bacula/.my.cnf' is ignored
mysqldump: Got error: 1045: Access denied for user 'root'@'localhost' (using password: NO) when trying to connect
[root@nicodemus bacula]# ls -l /var/spool/bacula/.my.cnf
----rw-rw-. 1 root root 46 Oct 11 04:04 /var/spool/bacula/.my.cnf

# Now make the change and try again
[root@nicodemus bacula]# rm /var/spool/bacula/.my.cnf
[root@nicodemus bacula]# perl -i.bak -wple 's/0700/0077/;' /usr/libexec/bacula/make_catalog_backup.pl
[root@nicodemus bacula]# ./make_catalog_backup.pl MyCatalog
[root@nicodemus bacula]# echo $?
0
[root@nicodemus bacula]# ls -l /var/spool/bacula/.my.cnf
-rw-------. 1 root root 46 Oct 11 04:07 /var/spool/bacula/.my.cnf


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

[root@nicodemus ~]# rpm -q bacula-director-common
bacula-director-common-5.0.0-7.el6.x86_64

[root@nicodemus ~]# rpm -ql bacula-director-common|grep make_catalog_backup.pl
/usr/libexec/bacula/make_catalog_backup.pl



How reproducible:


Steps to Reproduce:
1. Install the bacula-director rpm and after configuring the mysql database and bacula-dir.conf file try to take a backup of the catalog
2. The catalog backup will fail
  
Actual results:
Backup of Bacula Catalog fails

Expected results:
Backup of Bacula Catalog should be successful

Additional info:

Comment 2 RHEL Program Management 2011-10-11 08:29:23 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unfortunately unable to
address this request at this time. Red Hat invites you to
ask your support representative to propose this request, if
appropriate and relevant, in the next release of Red Hat
Enterprise Linux. If you would like it considered as an
exception in the current release, please ask your support
representative.

Comment 3 Lukáš Nykrýn 2011-10-13 08:07:52 UTC

*** This bug has been marked as a duplicate of bug 651780 ***


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