Bug 857939 - dirsrv fails to start on reboot due to /var/run/dirsrv permissions
Summary: dirsrv fails to start on reboot due to /var/run/dirsrv permissions
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: 389-ds
Version: 17
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Rich Megginson
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-17 14:35 UTC by John Ellson
Modified: 2020-09-13 20:23 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-08-01 09:56:00 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github 389ds 389-ds-base issues 583 0 None closed dirsrv fails to start on reboot due to /var/run/dirsrv permissions 2020-11-16 12:25:43 UTC

Description John Ellson 2012-09-17 14:35:42 UTC
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 14:37:20 UTC
(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 15:04:20 UTC
# 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 15:10:15 UTC
(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 15:31:01 UTC
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 18:34:56 UTC
Upstream ticket:
https://fedorahosted.org/389/ticket/583

Comment 6 Fedora End Of Life 2013-07-04 02:59:52 UTC
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 09:56:04 UTC
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.