Bug 982781

Summary: /var/lib/unbound is unowned and has wrong user/group
Product: [Fedora] Fedora Reporter: Jerry James <loganjerry>
Component: unboundAssignee: Paul Wouters <pwouters>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: rawhideCC: pwouters, thozza, vonsch
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-10 14:47:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jerry James 2013-07-09 21:36:10 UTC
Description of problem:
Saw this in a Rawhide update:

[1373404686] libunbound[21588:0] error: could not open autotrust file for writing, /var/lib/unbound/root.key.21588-0: Permission denied

# ls -al /var/lib/unbound
total 12
drwxr-xr-x.  2 root    root    4096 Apr 22 16:17 .
drwxr-xr-x. 54 root    root    4096 Jul  3 14:48 ..
-rw-r--r--.  1 unbound unbound  758 Apr 22 16:17 root.key

So the unbound user can't write to that directory.  Who owns it anyway?

# rpm -qf /var/lib/unbound
file /var/lib/unbound is not owned by any package

Version-Release number of selected component (if applicable):
unbound-libs-1.4.20-15.fc20.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Run the unbound-libs %post script
2.
3.

Actual results:
An error message similar to the one above.

Expected results:
No error.

Additional info:

Comment 1 Tomáš Hozza 2013-07-10 07:05:34 UTC
/var/lib/unbound is owned by unbound-libs package.

$ rpm -qlp unbound-libs-1.4.20-15.fc20.x86_64.rpm
/etc/cron.d/unbound-anchor
/etc/unbound
/etc/unbound/dlv.isc.org.key
/etc/unbound/icannbundle.pem
/etc/unbound/root.key
/usr/lib64/libunbound.so.2
/usr/lib64/libunbound.so.2.1.5
/usr/sbin/unbound-anchor
/usr/share/doc/unbound-libs-1.4.20
/usr/share/doc/unbound-libs-1.4.20/LICENSE
/usr/share/doc/unbound-libs-1.4.20/README
/var/lib/unbound
/var/lib/unbound/root.key

Please try to reinstall of remove/install unbound. I think that your issue is
probably caused by some remains of older package/system (I can see Apr 22 there).

Comment 2 Jerry James 2013-07-10 14:42:08 UTC
Sure enough, reinstalling unbound-libs made the problem go away.  Thanks, Tomas!

Comment 3 Tomáš Hozza 2013-07-10 14:47:26 UTC
(In reply to Jerry James from comment #2)
> Sure enough, reinstalling unbound-libs made the problem go away.  Thanks,
> Tomas!

I'm glad to hear that. You're welcome.