ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I created a chroot jail setup in Fedora Core 2 in a 64 bit OS. After creating the chroot setup and copied the necessary files from the system (like /etc/hosts, /etc/password ...), I tried running the apache in the chroot jail by the command '/usr/sbin/chroot /CHROOT/ /apache/bin/httpd -k start'. But this fails with an error ' httpd: bad user name nobody'. I have greped the 'nobody' part from both the '/etc/passwd' and '/etc/group' files and put it in chroot jail. There is 'nobody' user with id '99'. How to solve this? Any idea?
Check to see that you are using the correct root directory and that the jail is mounted if necessary. Do you have a shell installed in the jail? It's possible that the program requires the 'system' function to find the appropriate user ID, which requires a shell.
Maybe you could bind (using 'mount --bind') /etc, /bin, /sbin, and /lib read-only into the jail instead of building a new root file system? Does the program require temp files? How much of a system does it really require? Everything needs to be in the jail, but duplicating the info isn't necessarily the best way to do that.
ta0kira
Tried the 'mount --bind' options for /etc, /bin, /lib, /sys etc.., Even tried
copying the /bin/sh, /bin/bash files into the /CHROOT setup. But nothing helped. Same error occurs?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.