Bug 251090 - ds_remove cannot remove/rename directories
ds_remove cannot remove/rename directories
Product: 389
Classification: Community
Component: Admin (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Noriko Hosoi
Viktor Ashirov
Depends On:
Blocks: 240316 FDS1.1.0
  Show dependency treegraph
Reported: 2007-08-06 21:21 EDT by Noriko Hosoi
Modified: 2015-12-07 11:41 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-12-07 11:41:10 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
email discussion with Rich (4.73 KB, text/html)
2007-08-06 21:21 EDT, Noriko Hosoi
no flags Details
cvs diff DSCreate.pm.in (2.36 KB, patch)
2007-08-07 14:15 EDT, Noriko Hosoi
no flags Details | Diff
cvs diff (adminserver) (2.26 KB, patch)
2007-08-07 14:20 EDT, Noriko Hosoi
no flags Details | Diff
cvs commit message (comment #2, #3) (1.68 KB, text/plain)
2007-08-07 19:31 EDT, Noriko Hosoi
no flags Details
Problem description (1.69 KB, text/plain)
2007-09-27 12:23 EDT, Noriko Hosoi
no flags Details
cvs diffs (2.56 KB, patch)
2007-09-27 12:35 EDT, Noriko Hosoi
no flags Details | Diff
cvs commit message (1.56 KB, text/plain)
2007-09-27 12:56 EDT, Noriko Hosoi
no flags Details

  None (edit)
Description Noriko Hosoi 2007-08-06 21:21:01 EDT
Description of problem:
ds_remove is supposed to remove all the specified slapd-ID directories except
etc/brand-ds/slapd-ID.  The config dir name is renamed to slapd-ID.removed and
keep the cert/key DBs.

But if installing the server as root and set (nobody, nobody) to the server's
unix uid and gid, the instance dir and the config dir are left as is.

Attaching the email discussion with Rich.
Comment 1 Noriko Hosoi 2007-08-06 21:21:02 EDT
Created attachment 160789 [details]
email discussion with Rich
Comment 2 Noriko Hosoi 2007-08-07 14:15:49 EDT
Created attachment 160834 [details]
cvs diff DSCreate.pm.in

Files: ldapserver/ldap/admin/src/scripts/DSCreate.pm.in

Changes: when creating inst_dir and config_dir, make sure the parent dirs
(lib/<brand>-ds and etc/<brand>-ds) have the specified gid.
Comment 3 Noriko Hosoi 2007-08-07 14:20:38 EDT
Created attachment 160835 [details]
cvs diff (adminserver)


  ds_remove.in: fixing a syntax error
  AdminUtil.pm.in: return an error when connection fails
  register-ds-admin.pl: fixing the error checking
Comment 4 Noriko Hosoi 2007-08-07 14:22:42 EDT
How bo verify the bug:
A. creating server instances
# become root and run the setup scripts as follows
# choose nobody, nobody for the UNIX user and group
1. sbin/setup-ds-admin.pl  #  create a config server
2. sbin/setup-ds-admin.pl  #  create a sub server sub1
3. startconsole            #  create a sub server sub2
4. sbin/setup-ds.pl; sbin/register-ds-admin.pl # create a sub server sub3

B. removing server instances
Console: remove a sub server (sub3)
Expected result:
# du -a | egrep sub3
20      ./etc/fedora-ds/slapd-sub3.removed/key3.db
20      ./etc/fedora-ds/slapd-sub3.removed/secmod.db
72      ./etc/fedora-ds/slapd-sub3.removed/cert8.db
120     ./etc/fedora-ds/slapd-sub3.removed

Command line:
sbin/ds_removal -s sub2 -w <admin_password>
Expected result:
# du -a | egrep sub2
20      ./etc/fedora-ds/slapd-sub2.removed/key3.db
20      ./etc/fedora-ds/slapd-sub2.removed/secmod.db
72      ./etc/fedora-ds/slapd-sub2.removed/cert8.db
120     ./etc/fedora-ds/slapd-sub2.removed
Comment 5 Noriko Hosoi 2007-08-07 19:31:35 EDT
Created attachment 160872 [details]
cvs commit message (comment #2, #3)

Reviewed by Rich and Nathan (Thank you!!!)

Checked in into HEAD.
Comment 6 Noriko Hosoi 2007-09-27 12:23:11 EDT
Created attachment 208571 [details]
Problem description
Comment 7 Noriko Hosoi 2007-09-27 12:35:35 EDT
Created attachment 208641 [details]
cvs diffs

  adminserver: admserv/cfgstuff/admserv.conf.in 
  mod_restartd: mod_restartd/mod_restartd.c

1) let ds_remove (CGI) run with the root permission.
2) acl names for SIE group were identical for all the DS instances: "SIE
Group", which should be different for each instance.
Comment 8 Noriko Hosoi 2007-09-27 12:56:21 EDT
Created attachment 208681 [details]
cvs commit message

Reviewed by Rich (Thank you!)

Checked in into HEAD.
Comment 9 Yi Zhang 2007-11-28 18:59:45 EST
Verified. Pass
Test machine: cypher.dsdev.sjc.redhat.com (REHL5 64bit)

Please refer to bug: 247215 for test steps

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