Hiya ppl, tester:x:510:100::/home/tester/./public_html/:/bin/false Why this string in /etc/passwd doesn't work ? user tester loged into system via ftp (server wuftpd) ,but chroot(); doesn't call,so user tester can work like normal user with all directories.. -- /Huk (mailto: nickaa@soldier.net) -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
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 Some system stats: # grep ftp /etc/passwd ftp:x:14:50:FTP User:/home/ftp:/bin/true # ls -l /bin/bash -rwxr-xr-x 1 root root 490964 Aug 22 12:25 /bin/bash # grep ftp /etc/group ftp::50:ftp # cat /etc/ftpchroot ftp hank 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. 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. Thanks HaNK On Tue, Nov 23, 1999 at 06:52:52PM +0300, Huk wrote:
tester:x:510:100::/home/tester/./public_html/:/bin/false
Why this string in /etc/passwd doesn't work ?
user tester loged into system via ftp (server wuftpd) ,but chroot(); doesn't call,so user tester can work like normal user with all directories..
-- [-=-=-=-=-=-=-=-=-=-=- adam j henry =-=-=-=-=-=-=-=-=-=-=] | [http: www.heidelberg.edu/~ahenry] [pgp: 0x92B1EDF5] | | [mailto: ahenry@heidelberg.edu] [icq: 5794025] | [-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=] -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
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@heidelberg.edu] [icq: 5794025] | [-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=] -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
participants (2)
-
ahenry@cusa.dyndns.org
-
nickaa@soldier.net