home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.security.misc
- Path: sparky!uunet!gumby!destroyer!cs.ubc.ca!newsserver.sfu.ca!howesb
- From: howesb@monashee.sfu.ca (Charles Howes)
- Subject: Re: Ftp'ing out of a chroot()ed environment
- Message-ID: <1992Nov17.030943.4561@sfu.ca>
- Sender: news@sfu.ca
- Organization: Simon Fraser University, Burnaby, B.C., Canada
- References: <1e8od6INN1b4@ef2007.efhd.ford.com> <BxtxxJ.K4n@news.iastate.edu>
- Date: Tue, 17 Nov 1992 03:09:43 GMT
- Lines: 31
-
- >smd@sl0091.srl.ford.com (Steve Dahmen) writes:
- ] Does anybody understand chroot and ftp/telnet enough to tell me why
- ] I can't get ftp nor telnet to run in my chrooted account?? I'd like
- ] to set up a user zone to allow simple ftp/telnet through without opening
- ] my whole system.
- ]
- ] I did a dump -n on the binaries and ensured the requested libraries are
- ] available in the chrooted environment. Do I need anything special in
- ] /etc (I have resolv.conf) or /dev???
- ]
- ] Help.
-
- I recommend doing a 'trace' on telnet in the normal environment, and
- massaging the output of that to get a list of the directories and files you
- need to migrate. Here's a new-awk script that converts the trace output
- file into the appropriate commands:
- =========================fix.awk=============================================
- $1 ~ /^(open|stat|creat|unlink)$/ {
- sub("^[^\"]*\"","");
- sub("\".*$","");
- for (x=2;x<=length($0);x++)
- if (substr($0,x,1)=="/") print "mkdir ~ftp"substr($0,1,x)
- if ($0 ~ /\/./) print "cp "$0" ~ftp"$0
- }
- =============================================================================
- So type:
- trace -o output /usr/ucb/ftp somehost.edu
- nawk -f fix.awk output > file1
- sort -u < file1 > result
- vi result
- source result
-