Admin-Ahead Community

Linux => General Linux => Topic started by: Aby on February 07, 2014, 02:08:55 pm

Title: Chroot: '/usr/sbin/nginx' No such file or directory
Post by: Aby on February 07, 2014, 02:08:55 pm
Error: chroot: '/usr/sbin/nginx' No such file or directory

If you encounter this error when running the daemon of nginx using chroot, this is likely due to missing 64 bit libraries in the jailed environment.
If you are running chroot in /srv/http you need to add the required 64 bit libraries.
First, set up the directories (these commands will need to be run as root)

# mkdir /srv/http/usr/lib64
# cd /srv/http; ln -s usr/lib64 lib64

Then copy the required 64 bit libraries found using ldd /usr/sbin/nginx to /srv/http/usr/lib64
if run as root, permissions for the libraries should be read and executable for all users, so no modification is required.
----