Jail Install

BigWil

Verified User
Joined
Aug 5, 2004
Messages
313
Ok. It looks like this is the place for this sort of thing and it looks also like the FreeBSD 4x section needs a kick start so....

What is the correct way to install the SSH jailing on FreeBSD 4.x? I have tried the following:

cd /usr/local/directadmin/customapache
mkdir jail
cd jail
cd wget http://files.directadmin.com/services/customapache/jail/build
chmod 755 build
./build update
./build all

The tests in buildall couldn't complete because it was unable to start apache back up due to configuration problems after the build. Here is apache's complaint.

Syntax error on line 160 of /etc/httpd/conf/httpd.conf:
Cannot add module via name 'mod_php4.c': not in list of loaded modules

So I guess it didn't like that build and now I have a dead or semi-dead apache install. Suggestions?


Wil
 

kamsel

Verified User
Joined
May 8, 2004
Messages
41
Is your problem solved yet? because I would like to install it too, but I am afraid to do so.

thx
 

BigWil

Verified User
Joined
Aug 5, 2004
Messages
313
I was informed that the issue was fixed. Perhaps run your updater so you get the new files, then give it a shot.

I wasn't told any more than "we fixed the file with the problem." I think the trouble was in the httpd startup file in rc.d.

Wil
 

BigWil

Verified User
Joined
Aug 5, 2004
Messages
313
Now you need to jail the user. That was just the segment to allow the jailing functions. Now jail them:

cd /usr/local/directadmin/customapache/jail
./jail_user.sh username


Big Wil
 

kamsel

Verified User
Joined
May 8, 2004
Messages
41
Hi,

BigWil, thanks!

Just one more question, I wasn't able to find docs about "jail" and I am not sure how it works and how is it done etc. Where can I find more info about it?

kamsel
 

BigWil

Verified User
Joined
Aug 5, 2004
Messages
313
A good explanation can be found in several of the threads here in the forums. You can search for the word Jail and find lots of them. The clearest explanation I found is in the thread at:

http://tinyurl.com/3whr9

In short Jailing keeps the user in their own directory when they SSH into the system. There is additional jailing for the user when they are accessing the system through apache. That jailing can be implemented by adding the following parameter to the users virtual host directive in DirectAdmin.

SetEnv JAIL_DIR |HOME|

Hope this helps. The thread given above will give you a better understanding.

Big Wil
 
Top