Mailinglist Archive: opensuse (3236 mails)
| < Previous | Next > |
Re: [SLE] chroot();
- From: ahenry@xxxxxxxxxxxxxxx (Adam J. Henry)
- Date: Tue, 25 Jan 2000 14:11:25 -0500
- Message-id: <20000125141125.A6676@xxxxxxxxxxxxxxx>
On Tue, Jan 25, 2000 at 02:13:34AM -0500, Adam J. Henry wrote:
> I'm using ftpd-BSD for Linux on SuSE 6.2, and am experiencing several
> problems related to chroot not working.
>
> First, running chroot from the command line doesn't work. While root,
> running 'chroot ~ftp' will return the following error:
>
> # chroot ~ftp chroot: cannot execute /bin/bash: No such file
> or directory
The following doesn't work either. Note that I added the bash excutable to
the ~ftp/bin directory, which is described below.
# chroot ~ftp ~ftp/bin/bash
chroot: cannot execute /home/ftp/bin/bash: No such file or directory
> I can log into the server using a non-anonymous account. However,
> when logged in as anonymous issuing a 'ls' does not list the directory
> contents, even though I can change directories. These are my ~ftp
> permissions:
>
> dr-xr-xr-x 8 root users 1024 Jan 25 01:29 .
> drwxr-xr-x 16 root root 1024 Jan 7 12:02 ..
> dr-xr-xr-x 2 root ftp 1024 Nov 16 22:44 cps
> dr-xr-xr-x 7 root ftp 1024 Jan 19 19:58 pub
>
> So even though 'ls' doesn't tell me that the "pub" directory exists,
> I can still 'cd' into and out of it and underlying directories.
I have since added the following files/directory:
# ls -al ~ftp/bin
dr-xr-xr-x 2 root root 1024 Jan 25 11:56 .
dr-xr-xr-x 8 root ftp 1024 Jan 25 01:29 ..
-r-xr-xr-x 1 root root 490964 Jan 25 11:56 bash
> So how do I think this is related to chroot? Well, according to the BSD
> docs, chroot is executed before anonymous accounts are logged in. Regular
> user accounts are skipped, unless specified in the file '/etc/ftpchroot'.
> Before putting user "hank" into this file, I could log in though FTP.
> After the addition of this username, I received similar problems as
> when logged in as an anonymous user.
>
> Anyways, this is where my fiddling has carried me. The next obstacle
> in trying to get this port of a FTP server running is to figure out
> why I can't get chroot running from the command line. I would greatly
> appreciate anyone's suggestion.
Someone suggested that the reason behind chroot not working is that bash is
not under the new root, which I have attempted to correct this time around.
Unless I'm doing something very wrong, it still doesn't work.
--
[-=-=-=-=-=-=-=-=-=-=- adam j henry =-=-=-=-=-=-=-=-=-=-=]
| [http: www.heidelberg.edu/~ahenry] [pgp: 0x92B1EDF5] |
| [mailto: ahenry@xxxxxxxxxxxxxx] [icq: 5794025] |
[-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=]
--
To unsubscribe send e-mail to suse-linux-e-unsubscribe@xxxxxxxx
For additional commands send e-mail to suse-linux-e-help@xxxxxxxx
Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
| < Previous | Next > |