Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Security
User Name
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.


  Search this Thread
Old 05-03-2001, 06:21 AM   #1
LQ Newbie
Registered: Apr 2001
Posts: 2

Rep: Reputation: 0

Hm iam newbie and i need help.Iam trying to set up at a server that will handle web,ftp,sql some day .Now i have a RH 7.0,latest Apache and the latest WU-FTP.How do i chroot a user for ftp and web? this is driving me crazy,i haved tried for about 2 days and iam still not capable to chroot.Plz help me...

Old 05-06-2001, 04:17 PM   #2
LQ Newbie
Registered: Feb 2001
Location: in front of a computer
Posts: 24

Rep: Reputation: 15
Try installing Webmin. It's a GUI for Apache, as well as other system operations. I hear it works wonders......!
Old 05-14-2001, 03:49 AM   #3
Registered: May 2001
Distribution: OpenBSD 3.0-beta
Posts: 50

Rep: Reputation: 15
The way I setup a chroot is usually the following:

#setup a base directory and install xxx into it
mkdir /chroot/xxx
tar xzf|configure|make|make install xxx

#Find out library depends for binaries
ldd /chroot/xxx/bin/* /chroot/xxx/sbin/*

#Copy the libs over
cp /lib/<neededlibs> /usr/lib/<neededlibs> /chroot/{usr/}lib

#_TEMPORARILY_ copy sh (or the shell you prefer...) into the chroot env..
cp /bin/sh /chroot/xxx

#now enter the chroot env.
chroot /chroot/xxx /bin/sh

Now you're in your chrooted env, and you can try to start xxx. Try to start it with as much logging and debugging as possible, cuz this is likely to break the first time you use it.... Now you need to tweak xxx to run in the chroot...

Once you get the daemon to successfully run in the chroot, you can do something like chroot /chroot/xxx /sbin/xxx & from an rc scritp to start the daemon...

don't forget to rm -f that shell you left in the chroot!!!!


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
moving out home directory during ftp session saeed_zarea Linux - Networking 8 07-12-2011 08:07 AM
Apache Root/Home Directory and setting up FTP for home directories? Mankind75 Linux - Newbie 6 07-23-2006 03:37 PM
ftp cannot cd to my home directory powah Linux - Software 0 06-03-2005 12:10 PM
Need to chroot bash users to thier home directory coloradopaul Linux - Security 1 09-16-2004 11:51 PM
vsftpd home directory and chroot avante Linux - Networking 4 03-17-2003 02:56 AM > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 09:19 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration