Brett Wiesner
2009-Jan-18 23:54 UTC
[CentOS] Starting slapd: /bin/bash: /tmp/start-slapd.K12378: Permission denied
Hi, I'm running Centos 5, with openldap Version: 2.3.27 Release: 8.el5_2.4. When I run: $ sudo /etc/init.d/ldap start I get the following error: Starting slapd: /bin/bash: /tmp/start-slapd.l14891: Permission denied (obviously the temp file number changes every time). It appears to be a permission problem but I thought I did everything to set up the permissions correctly... Everything is owned by the ldap user: $ cd /etc/openldap/ $ ls -al total 40 drwxr-xr-x 4 ldap ldap 4096 Jan 16 18:07 . drwxr-xr-x 66 root root 4096 Jan 16 17:55 .. drwxr-xr-x 2 ldap ldap 4096 Jul 9 2008 cacerts -rw-r----- 1 ldap ldap 886 Jul 9 2008 DB_CONFIG.example -rw-r--r-- 1 ldap ldap 246 Jul 9 2008 ldap.conf drwxr-xr-x 3 ldap ldap 4096 Jan 16 17:40 schema -rw-r----- 1 ldap ldap 3456 Jan 16 18:07 slapd.conf -rw-r----- 1 ldap ldap 12288 Jan 16 18:07 .slapd.conf.swp $ sudo ls -al /var/lib/ldap/ total 572 drwx------ 2 ldap ldap 4096 Jan 16 17:41 . drwxr-xr-x 21 root root 4096 Jan 16 17:40 .. -rw-r--r-- 1 ldap ldap 2048 Jan 16 17:41 alock -rw------- 1 ldap ldap 24576 Jan 16 17:41 __db.001 -rw------- 1 ldap ldap 278528 Jan 16 17:41 __db.002 -rw------- 1 ldap ldap 270336 Jan 16 17:41 __db.003 -rw------- 1 ldap ldap 98304 Jan 16 17:41 __db.004 -rw------- 1 ldap ldap 352256 Jan 16 17:41 __db.005 -rw------- 1 ldap ldap 24576 Jan 16 17:41 __db.006 -rw------- 1 ldap ldap 10485760 Jan 16 17:41 log.0000000001 When I run slaptest, it doesn't look great, but it doesn't look like a problem... $ sudo /usr/sbin/slaptest bdb_db_open: Warning - No DB_CONFIG file found in directory /var/lib/ldap: (2) Expect poor performance for suffix dc=XXXX,dc=net. bdb_db_open: db_open(/var/lib/ldap/id2entry.bdb) failed: No such file or directory (2) bdb(dc=XXXX,dc=net): Unknown locker ID: 0 backend_startup_one: bi_db_open failed! (2) slap_startup failed (test would succeed using the -u switch) Does anyone know why I'm getting this permission denied message? Thanks, Brett -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20090118/df33c71b/attachment-0003.html>
Barry Brimer
2009-Jan-19 00:43 UTC
[CentOS] Starting slapd: /bin/bash: /tmp/start-slapd.K12378: Permission denied
> I'm running Centos 5, with openldap Version: 2.3.27 Release: 8.el5_2.4. > > When I run: > > $ sudo /etc/init.d/ldap start > > I get the following error: > > Starting slapd: /bin/bash: /tmp/start-slapd.l14891: Permission denied<snip> Any chance that /tmp is mounted noexec? What is the output of the "mount" command? Baryr
Filipe Brandenburger
2009-Jan-19 16:10 UTC
[CentOS] Starting slapd: /bin/bash: /tmp/start-slapd.K12378: Permission denied
Hi, On Sun, Jan 18, 2009 at 18:54, Brett Wiesner <brettwiesner at gmail.com> wrote:> $ sudo /etc/init.d/ldap start > Starting slapd: /bin/bash: /tmp/start-slapd.l14891: Permission deniedYour /tmp/ is mounted with noexec. To work around this, create a directory where the script can be written to and executed (can be owned by root:root and permissions 755), for example, /etc/openldap/initscript/, and then add the following line to /etc/sysconfig/ldap (create the file if it doesn't exist): TMP=/etc/openldap/initscript> bdb_db_open: Warning - No DB_CONFIG file found in directory /var/lib/ldap: (2) > Expect poor performance for suffix dc=XXXX,dc=net.I suggest you create a /var/lib/ldap/DB_CONFIG file with content such as the one below: set_cachesize 0 15000000 1 set_lg_regionmax 262144 set_lg_bsize 2097152 set_flags DB_LOG_AUTOREMOVE See "man slapd-bdb" for more details. HTH, Filipe