[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: not owned by ldap

On Wed, 4 Feb 2004, David Hughes wrote:

> Has anyone had this issue with the version of openldap-2.1.25?
> On startup or restart of ldap I'm getting this database ownership error.
> I'm running Fedora Core 1 fully updated.  The openldap server appears stable
> and can I add, edit, and view entries with no apparent problems.
> Stopping slapd:                                            [  OK  ]
> /var/lib/ldap/id2entry.bdb is not owned by "ldap"          [WARNING]
> /var/lib/ldap/dn2id.bdb is not owned by "ldap"             [WARNING]
> /var/lib/ldap/objectClass.bdb is not owned by "ldap"       [WARNING]
> /var/lib/ldap/cn.bdb is not owned by "ldap"                [WARNING]
> /var/lib/ldap/uid.bdb is not owned by "ldap"               [WARNING]
> Starting slapd:                                            [  OK  ]
> It's coming from this part of the init script:
> function start() {
>          # Check for simple-but-common errors.
>          user=ldap
>          ldapuid=`id -u $user`
>          # Unaccessible database files.
>          for dbdir in `grep ^directory /etc/openldap/slapd.conf | sed 
> s,^directory,,` ; do
>            for file in `find ${dbdir}/ -not -uid $ldapuid -and -name 
> "*.dbb" -or -name "*.gdbm" -or -name "*.bdb"` ; do
>              echo -n $"$file is not owned by \"$user\"" ; warning ; echo
>                  done

Most likely you want to 'chown ldap:ldap -R /var/lib/ldap' or similar (and 
any time you do slapadd or slapindex or db_recover as root etc).