LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


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

Rep: Reputation: 0
Unhappy


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, 03:17 PM   #2
gomer1701ems
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. http://www.webmin.com I hear it works wonders......!
 
Old 05-14-2001, 02:49 AM   #3
r3b00t
Member
 
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!!!!
 
  


Reply



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 07:07 AM
Apache Root/Home Directory and setting up FTP for home directories? Mankind75 Linux - Newbie 6 07-23-2006 02:37 PM
ftp cannot cd to my home directory powah Linux - Software 0 06-03-2005 11:10 AM
Need to chroot bash users to thier home directory coloradopaul Linux - Security 1 09-16-2004 10:51 PM
vsftpd home directory and chroot avante Linux - Networking 4 03-17-2003 01:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 12:16 PM.

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