The init.d script of the package gives the following incorrect warning about files not belonging to the ldap user:
* You have files in ... not owned by the ldap user, you must ensure they are accessible to the slapd instance!
The issue is caused by this line of the /etc/init.d/slapd script:
The check in this line should read: "if [ $? -eq 0 ]; then"
This is because the previous line reads:
/usr/bin/find $d ! -name DB_CONFIG ! -user ldap -o ! -group ldap |grep -sq .
The find command will give a list of offending files, which do not belong to the ldap user.
The subsequent grep command gives an exit status of 0 if a line is selected and 1 if no lines were selected.
So, in case some offending files exist, $? will be 0 and the error message should be displayed.
However if everything is fine, $? will be 1 and everything is fine.
Right now the warning about files with incorrect permission is only displayed when everything is correct - and is NOT shown when there are issues.