nscd does not create necessary directories in /var

Bug #3365 reported by Paul Roeland
44
Affects Status Importance Assigned to Milestone
glibc (Ubuntu)
Fix Released
Medium
Unassigned
Breezy
Invalid
Medium
Unassigned

Bug Description

The Breezy version of nscd (nscd_2.3.5-1ubuntu12) does not create /var/db/nscd and /var/run/nscd, causing nscd to fail relatively silently, only giving out hints in /var/log/syslog.

This bug was fixed on the source glibc package in Debian Sid, but apparently did not make it into Breezy.

Manually creating the directories and restarting /etc/init.d/nscd is a workaround fix for now.

Revision history for this message
Evgeny Stambulchik (fnevgeny) wrote :
Revision history for this message
Herbert Straub (herbert) wrote :

Nscd needs under all circumstances the /var/run/nscd directory. After the installation under Breezy the startup writes no errors, but no nscd process exists. The syslog.log containing:

/var/run/nscd/nscd.pid: No such file or directory
/var/run/nscd/socket: No such file or directory

and some other errors with the persitent database in /var/db/nscd, but this is not really required. After

mkdir /var/run/nscd and /etc/init.d/nscd start the process is up and running. I searched the source and find this definition in ./glibc-2.3.5/nscd/nscd-client.h

#define _PATH_NSCDPID "/var/run/nscd/nscd.pid"

I think the postinstallation process should create this directory.

Revision history for this message
Jean Christophe André (progfou) wrote :

This bug has been corrected in Debian "Sid", see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=314892 and http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=323487

Please consider merging up to Debian revision 2.3.5-4 since the only way to use nscd on Ubuntu right now is to do this:
- sudo aptitude install nscd
- sudo mkdir -p /var/run/nscd /var/db/nscd
- sudo /etc/init.d/nscd restart

Revision history for this message
Yann Rouillard (yann-pleiades) wrote :

debian package solved by just adding a debian/debhelper.in/nscd.dirs file containing:
var/run/nscd
var/db/nscd

Under ubuntu this will work for /var/db but not for /var/run as this directory is mounted on tmpfs and so recreated empty after each reboot.

Changed in glibc:
status: Unconfirmed → Confirmed
Revision history for this message
Yann Rouillard (yann-pleiades) wrote :

why don't you apply the patch proposed in bug https://launchpad.net/distros/ubuntu/+source/glibc/+bug/4641 ?

Revision history for this message
Scott Henson (scotth) wrote :

I would really like to see that patch applied. Please!!!

Actually I would have it make /var/db/nscd in the postinst and /var/run/nscd in the init script like the patch submitter does. Thanks.

Revision history for this message
Adam Conrad (adconrad) wrote :

Fixed in 2.3.6-0ubuntu17

Changed in glibc:
status: Confirmed → Fix Released
Revision history for this message
Adam Conrad (adconrad) wrote :

This will not be fixed in breezy, the changes aren't really critical enough.

Changed in glibc:
status: Unconfirmed → Rejected
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.