Bug 680564 - Don't create rundir in post installation script
Don't create rundir in post installation script
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: 389-ds-base (Show other bugs)
Unspecified Unspecified
high Severity high
: rc
: ---
Assigned To: Rich Megginson
Chandrasekar Kannan
: screened
Depends On: 680284
  Show dependency treegraph
Reported: 2011-02-25 17:22 EST by Rich Megginson
Modified: 2015-01-04 18:46 EST (History)
8 users (show)

See Also:
Fixed In Version: 389-ds-base-1.2.8-0.4.a3.el6
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 680284
Last Closed: 2011-05-19 08:42:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Rich Megginson 2011-02-25 17:22:29 EST
+++ This bug was initially created as a clone of Bug #680284 +++

We currently create /var/run/dirsrv in the post-install scripts if it doesn't already exist.  This can cause problems with incorrect permissions when you run setup-ds.pl.  The issue is that setup-ds.pl will leave the owner alone if /var/run/dirsrv exists already and it will reset the group permissions only.  If a SuiteSpotGroup is not specified, the group permissions are set to none.  This will cause the instance to not have permission to write it's pidfile unless it is configured to run as root.

If we don't create /var/run/dirsrv at post-install, setup-ds.pl will create it with the proper permissions.

--- Additional comment from rmeggins@redhat.com on 2011-02-24 21:31:15 EST ---

Created attachment 480912 [details]

--- Additional comment from rmeggins@redhat.com on 2011-02-25 17:22:03 EST ---

fedora rawhide:
commit 31909e6aa2f3550fd87fb316c95bb43752035b49
Author: Rich Megginson <rmeggins@redhat.com>
Date:   Thu Feb 24 15:44:15 2011 -0700

f15: commit 31909e6aa2f3550fd87fb316c95bb43752035b49
f14: commit 36b41d533e48a56782567185f71b30f201439124
f13: commit 7f60adcb57e5edbe1e9206d14eb09772f44c5dfb
el5: commit 9c6088654813d05b60d9b40f8f779ac81004bc38 and commit b5a7bced384e40f65be8a8d61ae05a8a61164bae
Comment 1 Rich Megginson 2011-02-25 21:16:08 EST
389-ds-base/RHEL-6 branch

Checking in 389-ds-base.spec;
/cvs/dist/rpms/389-ds-base/RHEL-6/389-ds-base.spec,v  <--  389-ds-base.spec
new revision: 1.14; previous revision: 1.13
Comment 4 Amita Sharma 2011-04-15 04:57:27 EDT
I request dev to please verify this.
Comment 5 Rich Megginson 2011-04-15 10:22:19 EDT
steps to verify:
1) get a clean system that has never had rhds or 389 installed on it
2) install the 389-ds-base rpm (or yum install)
3) check to see that the directory /var/run/dirsrv does not exist
Comment 6 Chandrasekar Kannan 2011-04-17 13:35:18 EDT
[svrbld@ds90-rhel6-32vm ~]$ sudo rpm -e 389-ds-base

[svrbld@ds90-rhel6-32vm ~]$ sudo ls /var/run/dirsrv
ls: cannot access /var/run/dirsrv: No such file or directory

[svrbld@ds90-rhel6-32vm ~]$ sudo yum install 389-ds-base
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package 389-ds-base.i686 0: will be installed
--> Finished Dependency Resolution

Dependencies Resolved

 Package                          Arch                      Version                               Repository                 Size
 389-ds-base                      i686                                     DS90                      1.2 M

Transaction Summary
Install       1 Package(s)

Total download size: 1.2 M
Installed size: 3.9 M
Is this ok [y/N]: y
Downloading Packages:
389-ds-base-                                                                         | 1.2 MB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : 389-ds-base-                                                                                 1/1 

  389-ds-base.i686 0:                                                                                                


[svrbld@ds90-rhel6-32vm ~]$ sudo ls /var/run/dirsrv
ls: cannot access /var/run/dirsrv: No such file or directory
[svrbld@ds90-rhel6-32vm ~]$
Comment 7 errata-xmlrpc 2011-05-19 08:42:15 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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