getpwnam issue

chadmiko nginx-forum at
Wed Jan 5 01:52:53 MSK 2011

I have seemingly solved this issue.  I failed to copy /lib/
into my chroot /lib folder but have added it and I can start nginx using
the start-stop-daemon command with the --chroot flag; strace is a

In case anyone else goes down this road in the future, you can strace
your start-stop-daemon call to a chrooted nginx as follows:

# start-stop-daemon --start --pidfile $PIDFILE --exec $DAEMON --chroot
$CHRDIR --startas /usr/bin/strace -- -f -o /tmp/$NAME.strace  $DAEMON

$PIDFILE = path/to/nginx/pid
$DAEMON = /usr/sbin/nginx
$CHRDIR = /chroot/nginx (or your chroot dir)
$NAME = nginx

make sure you copy /usr/bin/strace into $CHRDIR/usr/bin/ else the above
command will fail (don't forget to remove it after you've debugged
strace will be output to $CHRDIR/tmp/$NAME.strace.  

This is how I was able to determine what libraries I needed.

Posted at Nginx Forum:,163489,163540#msg-163540

More information about the nginx mailing list