FS#42197 - [openldap] FIx pidfile permissions

Attached to Project: Arch Linux
Opened by Nikolay Amiantov (abbradar) - Wednesday, 01 October 2014, 00:11 GMT
Last edited by Doug Newgard (Scimmia) - Wednesday, 01 October 2014, 02:50 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To No-one
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
slapd cannot start with default settings because of insufficient permissions for its pid file. It could be fixed by changing slapd.service file like this:

[Service]
Type=forking
PIDFile=/run/openldap/slapd.pid
User=ldap
Group=ldap
ExecStart=/usr/bin/slapd

Additional info:
* package version(s)
openldap 2.4.39-1

Steps to reproduce:
1. Try to run slapd with default settings and debug level
2. Observe an error
This task depends upon

Closed by  Doug Newgard (Scimmia)
Wednesday, 01 October 2014, 02:50 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#38408 
Comment by Nikolay Amiantov (abbradar) - Wednesday, 01 October 2014, 00:24 GMT
Sorry, I forgot to do daemon-reload, which revealed permission problems. New solution:

[Unit]
Description=OpenLDAP server daemon

[Service]
Type=forking
PIDFile=/run/openldap/slapd.pid
ExecStartPre=/usr/bin/mkdir -p /run/openldap
ExecStartPre=/usr/bin/chown ldap:ldap /run/openldap
ExecStart=/usr/bin/slapd -u ldap -g ldap

[Install]
WantedBy=multi-user.target
Comment by Nikolay Amiantov (abbradar) - Wednesday, 01 October 2014, 00:40 GMT
Just spotted tmpfiles.d file. Closing this; forgive me for this clumsiness, haven't slept well.

Loading...