Carlos, On Saturday 26 February 2005 04:51, Carlos E. R. wrote:
The Thursday 2005-02-24 at 18:12 -0800, Randall R Schulz wrote:
The user "anonymous" sees nothing, unless you define a default tree of files for him to see (/srv/ftp, for example). This does not depend on the server being chrooted or not.
Look closely. It (the server) told him the current directory was "/" and he tried a "cd home" and was told "No such file or directory". That can only be true if the FTP server is running in a chroot jail.
Not really. It also happens if you don't define a default tree structure, for the user "anonymous". I know, I tried (with vsftpd in my case)
Look:
cer@nimrodel:~> ls /srv/ftp cer@nimrodel:~> ftp localhost Connected to localhost. 220 "Welcome to nimrodel FTP service." Name (localhost:cer): anonymous 331 Please specify the password. Password: 230 Login successful. Remote system type is UNIX. Using binary mode to transfer files. ftp> ls 229 Entering Extended Passive Mode (|||18629|) 150 Here comes the directory listing. 226 Directory send OK. ftp> pwd 257 "/" ftp>
ftp> cd home 550 Failed to change directory. ftp> cd / 250 Directory successfully changed. ftp> ls 229 Entering Extended Passive Mode (|||49268|) 150 Here comes the directory listing. 226 Directory send OK. ftp>
¿Convinced? My anonymous user sees _nothing_.
I don't see the difference. You changed to directory "/" but did not see the contents of that the server host's root directory (I assume it's not some kind of phantom Linux with no files in its root directory).
After I create a file in /srv/ftp, he sees that file - and that is as it should be. And no, my vsftpd is not chrooted:
#chroot_local_user=YES #chroot_list_enable=YES #chroot_list_file=/etc/vsftpd.chroot_list
OK, fine. Vsftp simulates it. From the FTP client's perspective, it's a distinction without a difference. The "/" is synthesized for the client and is not the server's "/", so "/home" is not going to provide access to the server host's "/home".
-- Cheers, Carlos Robinson
Randall Schulz