Fri 29 Dec 2006
Using Your FTP Server 331 Please specify the password. Password: 230 Login successful. Have fun. Remote system type is UNIX. Using binary mode to transfer files. 2. Change directory to the pub/upload directory. Try to list its contents - you’ll find that you can’t, because that’s the way we configured the permissions on the upload directory: ftp> cd /pub/upload 250 Directory successfully changed. ftp> ls 227 Entering Passive Mode (192, 168, 0, 99, 95, 148) 150 Here comes the directory listing. 226 Transfer done (but failed to open directory). 3. However, you can upload a file. To prove it, use the put command to upload a simple file like this: ftp> put uploadtest.txt local: uploadtest.txt remote: uploadtest.txt 227 Entering Passive Mode (192,168,0,99,133,229) 150 Ok to send data. 226 File receive OK. 40 bytes send in 0.000101 secs (2.1e+02 Kbytes/sec) 4. That’s it. Now you can close the FTP session: ftp> bye 221 Goodbye. # Now you can go back to your FTP server and check the contents of the /var/ftp/pub/upload directory. You should find the uploadtest.txt file that was just uploaded from the client. FTP Authentication via System Accounts We’ve seen some examples using anonymous access to the vsftpd FTP server (via the anonymous or ftp username), but what happens if a user has a system account and tries to gain access? Well, by default, vsftpd allows this, and gives the user access to their home directory this way. For example, suppose your system has an account for the user called eziodm. This user can use an FTP client to log in and gain access to their home directory, /home/eziodm, via vsftpd like this: # ftp 192.168.0.99 Connected to 192.168.0.99 (192.168.0.99). 220 (vsFTPd 1.1.3) Name (192.168.0.99:none): eziodm 331 Please specify the password. Password: 230 Login successful. Have fun. Remote system type is UNIX. Using binary mode to transfer files. ftp> ls …lists contents of /home/eziodm directory… This can be useful, if your situation demands it. For example, you could set a machine up as a dedicated FTP server and create an account for each user that needs to perform FTP: # useradd -m -d /home/eddiew # passwd eddiew Changing password for user eddiew. 284
Hint: This post is supported by Gama web hosting php mysql provider