LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   chroot jail question (https://www.linuxquestions.org/questions/linux-security-4/chroot-jail-question-114154/)

f1uke 11-09-2003 02:23 PM

chroot jail question
 
Im trying to work out kinks in my rootjail, when running ps i get this error

Signal 11 caught by ps (procps version 3.1.6).
Please send bug reports to <acahalan@cs.uml.edu>

I have been unable to trace this error down, any ideas. i seem to have all the libs required what could i be missing?

jeremy 11-09-2003 02:25 PM

Have you tried a `strace ps`? This should help you find out what is happening. Don't forget that ps relies heavily on /proc (which is probably not available in your chroot jail).

--jeremy

f1uke 11-10-2003 11:35 AM

yea i didnt have it mounted, i fixed that. But i have another question. I basically cp'd the whole /etc dir over. can i get rid or all the system configs like rc.* and host.* configs in the jail etc dir, will that hurt anything? And can I rm the entries in the jailed passwd and shadow file that do not pertain to the jail users? like ftp: and at: entries?
thanks, jason.

unSpawn 11-10-2003 12:14 PM

yea i didnt have it mounted, i fixed that.
Note /proc should ONLY be mounted for troubleshooting purposes.
If your jailed app needs /proc, then you should first look for alternatives.
Unrestricted and unprotected /proc access is one of the ways to get out of a chroot.


I basically cp'd the whole /etc dir over.
That ain't the "proper" way to set up a chroot.
Check out the LQ FAQ: Security references, post #4 "Chroot, chrooting, jailing, comparimization", for SW to help you populate your chroot if you don't need/use a HOWTO. I prefer using http://www.gsyc.inf.uc3m.es/~assman/jail as it automates populating most of the time, then tweak auth/config manually and test. If you didn't read a HOWTO on chrooting you should, it's easy to make mistakes.


And can I rm the entries in the jailed passwd and shadow file that do not pertain to the jail users? like ftp: and at: entries?
If they don't own files or have no other business in the chroot: yes.


All times are GMT -5. The time now is 09:17 AM.