#125 fails to write pid file if server user changes
Closed: wontfix None Opened 12 years ago by mkosek.

https://bugzilla.redhat.com/show_bug.cgi?id=317071

Description of problem:
If for whatever reason the server user changes (in my case it was rerunning the
the initial setup tool) the init script will report that the server fails to
start because it doesn't have permission to write the pid file.

My /var/run/dirsrv directory was owned by nobody:nobody and I had changed DS to
run as dirsrv.  I notice that the initscript in CVS has a little bit more logic
but not quite enough to fix this problem.

Maybe just something like:

Index: initscript.in
===================================================================
RCS file: /cvs/dirsec/adminserver/wrappers/initscript.in,v
retrieving revision 1.1
diff -p -u -8 -r1.1 initscript.in
--- initscript.in       15 Jun 2007 17:13:02 -0000      1.1
+++ initscript.in       3 Oct 2007 16:41:26 -0000
@@ -58,19 +58,17 @@ fix_pid_dir_ownership()
         dirowner=`ls -ld $piddir | awk '{print $3}'`
         dirgrp=`ls -ld $piddir | awk '{print $4}'`
         if [ "$owner" != "$dirowner" ]; then
             groups $owner | grep $dirgrp > /dev/null 2>&1
             rc=$?
             if [ $rc -eq 0 ]; then
                 chmod 770 $piddir
             else
-                echo_n "$piddir is not writable for $owner"
-                failure; echo
-                exit 1
+                chown $owner $piddir
             fi
         fi
     else
         mkdir -p $piddir
         owner=`grep \^nsslapd-localuser $1/dse.ldif | awk '{print $2}'`
         if [ -n "$owner" ] ; then
             chown $owner $piddir
             chmod 700 $piddir

batch update to FUTURE milestone

Added initial screened field value.

Metadata Update from @nkinder:
- Issue set to the milestone: N/A

7 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/125

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: Invalid)

3 years ago

Login to comment on this ticket.

Metadata