Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 24407 - OpenLDAP permissions in /var/lib/openldap-* are wrong, should be ldap:ldap, but is root:root
Summary: OpenLDAP permissions in /var/lib/openldap-* are wrong, should be ldap:ldap, b...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Nick Hadaway
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-13 13:59 UTC by Stephan Wentz
Modified: 2003-07-14 06:59 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephan Wentz 2003-07-13 13:59:56 UTC
i just emerged openldap, configured it, started it through "/etc/init.d/slapd
start", tried to add an ldif-file, but it always failed with "ldap_add:
Operations error". after some searching on the config/client-side i stopped
slapd and started it with strace by hand, and it threw some "permission
denied"-errors. i changed /var/lib/openldap-* to ldap:ldap and everything
worked. (/etc/init.d/slapd starts the slapd with "-u(ser) ldap" and "-g(roup) ldap")

drwx------    2 ldap     ldap         4096 Jul 13 02:13 /var/lib/openldap-data
drwx------    2 ldap     ldap         4096 Jul 13 21:30 /var/lib/openldap-ldbm
drwx------    3 ldap     ldap         4096 Jul 13 21:40 /var/lib/openldap-slurp


Reproducible: Always
Steps to Reproduce:
1.emerge openldap
2.
3.

Actual Results:  
it didn't work (ldapadd threw errors)

Expected Results:  
it should've worked ;-)
Comment 1 Nick Hadaway 2003-07-13 16:37:05 UTC
Added a line to pkg_postinst which will take care of this permission problem related to upgrading from builds which ran slapd as root.
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2003-07-13 17:43:19 UTC
One special note with this.
If you populate your database with slapadd initially, you MUST change the owner and group on the /var/lib/openldap-{data,ldbm} files yourself!
slapadd creates them as chmod 600, chown root.root.
Comment 3 Carsten Lohrke (RETIRED) gentoo-dev 2003-07-13 18:35:05 UTC
^^ einfo would be helpful
Comment 4 Stephan Wentz 2003-07-14 06:59:30 UTC
hmm i wasn't upgrading, i emerged it for the first time, and didn't populate it by hand, i just ran ldapadd with an ldif-file, but the permissions where root.root...