Bug 857939 - dirsrv fails to start on reboot due to /var/run/dirsrv permissions
dirsrv fails to start on reboot due to /var/run/dirsrv permissions
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: 389-ds (Show other bugs)
17
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Rich Megginson
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-09-17 10:35 EDT by John Ellson
Modified: 2013-08-01 05:56 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-01 05:56:00 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)

  None (edit)
Description John Ellson 2012-09-17 10:35:42 EDT
Description of problem:

/var/log/dirsrv/slapd-myhost/errors  contains:

[17/Sep/2012:05:09:24 -0400] - Unable to access nsslapd-rundir: Permission denied
[17/Sep/2012:05:09:24 -0400] - Ensure that user "dirsrv" has read and write permissions on /var/run/dirsrv
[17/Sep/2012:05:09:24 -0400] - Shutting down.


This dirsrv is running as dirsrv:dirsrv , but I was getting the same problem with the default nobody:nobody.

I can't change permissions on /var/run/dirsrv because something (what?) during the boot process always resets the ownershio to root:root 770



Version-Release number of selected component (if applicable):
389-ds-1.2.2-2.fc17.noarch


How reproducible:
100%

Steps to Reproduce:
1. reboot
2.
3.
  
Actual results:
fails to start due to permissions...

Expected results:
dirsrv shoudl start without intervention after reboot.

Additional info:
Comment 1 Rich Megginson 2012-09-17 10:37:20 EDT
(In reply to comment #0)
> Description of problem:
> 
> /var/log/dirsrv/slapd-myhost/errors  contains:
> 
> [17/Sep/2012:05:09:24 -0400] - Unable to access nsslapd-rundir: Permission
> denied
> [17/Sep/2012:05:09:24 -0400] - Ensure that user "dirsrv" has read and write
> permissions on /var/run/dirsrv
> [17/Sep/2012:05:09:24 -0400] - Shutting down.
> 
> 
> This dirsrv is running as dirsrv:dirsrv , but I was getting the same problem
> with the default nobody:nobody.
> 
> I can't change permissions on /var/run/dirsrv because something (what?)
> during the boot process always resets the ownershio to root:root 770
> 
> 
> 
> Version-Release number of selected component (if applicable):
> 389-ds-1.2.2-2.fc17.noarch
> 
> 
> How reproducible:
> 100%
> 
> Steps to Reproduce:
> 1. reboot
> 2.
> 3.
>   
> Actual results:
> fails to start due to permissions...
> 
> Expected results:
> dirsrv shoudl start without intervention after reboot.
> 
> Additional info:

cat /etc/tmpfiles.d/dirsrv*
Comment 2 John Ellson 2012-09-17 11:04:20 EDT
# cat /etc/tmpfiles.d/dirsrv*
d /var/run/dirsrv 0770 root root
d /var/lock/dirsrv 0770 root root
d /var/lock/dirsrv/slapd-lweb1-vhost4 0770 root root
d /var/run/dirsrv 0770 nobody nobody
d /var/lock/dirsrv 0770 nobody nobody
d /var/lock/dirsrv/slapd-lweb1-vhost4 0770 nobody nobody



Am I supposed to edit that file?
Comment 3 Rich Megginson 2012-09-17 11:10:15 EDT
(In reply to comment #2)
> # cat /etc/tmpfiles.d/dirsrv*
> d /var/run/dirsrv 0770 root root
> d /var/lock/dirsrv 0770 root root
> d /var/lock/dirsrv/slapd-lweb1-vhost4 0770 root root
> d /var/run/dirsrv 0770 nobody nobody
> d /var/lock/dirsrv 0770 nobody nobody
> d /var/lock/dirsrv/slapd-lweb1-vhost4 0770 nobody nobody
> 
> 
> 
> Am I supposed to edit that file?

Yes, looks like it.

Not sure what happened - why it has both root and nobody listed.
Comment 4 John Ellson 2012-09-17 11:31:01 EDT
There was a another file in that directory  dirsrv-lweb1-vhost4.BAK.conf
from an earlier attempt of mine to move stuff aside while trying various edits - which then got falsely picked up as another instance.

I removed that, and changed "nobody" to "dirsrv" in the real one, and now the server starts.

BTW, the instructions in the 389 docs for cleaning out a previous DS are completely insufficient.   DS leaves detritus all over the place which *will* mess up any new installation.  My current eradication script looks like:

systemctl stop dirsrv.target
systemctl stop dirsrv-admin.service
remove-ds-admin.pl -y
yum remove '389*' -y
userdel dirsrv
rm -rf  /etc/sysconfig/dirsrv* \
        /etc/dirsrv* \
        /etc/tmpfiles.d/dirsrv* \
        /var/log/dirsrv* \
        /var/lib/dirsrv* \
        /var/run/lock/dirsrv* \
        /root/.389-console \
        /home/*/.389-console \
        /var/mail/dirsrv* \
        /home/dirsrv
Comment 5 Rich Megginson 2013-02-13 13:34:56 EST
Upstream ticket:
https://fedorahosted.org/389/ticket/583
Comment 6 Fedora End Of Life 2013-07-03 22:59:52 EDT
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 7 Fedora End Of Life 2013-08-01 05:56:04 EDT
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

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