db-control command is failing with error "Permission denied".

Solution Verified - Updated -

Environment

  • Red Hat Satellite 5.4

Issue

  • db-control command is failing with error:
Can't open config file '/etc/rhn/default/rhn_web.conf': Permission denied at /usr/lib/perl5/vendor_perl/5.8.8/PXT/Config.pm line 70.
Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.8/Dobby/DB.pm line 18.
BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/Dobby/DB.pm line 18.
Compilation failed in require at /usr/lib/perl5/vendor_perl/5.8.8/Dobby/CLI/MiscCommands.pm line 21.
BEGIN failed--compilation aborted at /usr/lib/perl5/vendor_perl/5.8.8/Dobby/CLI/MiscCommands.pm line 21.
Compilation failed in require at /usr/bin/db-control line 8.
BEGIN failed--compilation aborted at /usr/bin/db-control line 8.

Resolution

  • The oracle user should be a member of the apache group.
# gpasswd -a oracle apache
  • Then verify with
# su - oracle

# db-control status

Root Cause

  • Oracle user should be a member of the apache group.

Diagnostic Steps

  • Verify permission for
# ls -l /etc/rhn/default/rhn_web.conf
  • Verify weather oracle user is part of apache group or not.
# id oracle
  • Verify permission for
ls -ld /etc/rhn /etc/rhn/default
drwxr-x--- 6 root apache 4096 Sep 24  2012 /etc/rhn
drwxr-xr-x 2 root apache 4096 Oct 10 14:42 /etc/rhn/default

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments