Using Your FTP Server So, we’ll set up the FTP server for anonymous write access first; then we’ll test it again using an FTP client. Setting up the FTP Server for Anonymous Write Access There are four steps here. We’ll need to create the folder, set the appropriate permissions, and then enable uploading in the FTP server configuration: 1. First, we need to create a writeable directory. Again, you’ll need the root account for this. Let’s create a directory called /upload (in the /var/ftp/pub directory): # cd /var/ftp/pub # mkdir upload 2. Next, we need to set the permission of the upload directory so that it allows write-only access to anonymous FTP users (so that they can write to the directory but not to download from it - this restricts file sharing among FTP users). To do this, we’ll first use the chgrp command to change the group associated with the upload directory: # chgrp ftp upload Now, the owner of the folder is still root, but the directory’s group is ftp - the set of FTP users. Now we’ll use the chmod command to assign read/write/execute access to the owner, write/access only to the group, and deny access to other users: # chmod -R u=rwx, g=wx, o-rxw upload 3. Finally, we must configure the vsftpd server to allow anonymous upload. To do this, we simply edit the configuration file, /etc/vsftpd/vsftpd.conf. Open this file using gedit (or your favorite text editor), and locate the following lines: # Uncomment this to allow the anonymous FTP user to upload files. This only # has an effect if the above global write enable is activated. Also, you will # obviously need to create a directory writable by the FTP user. #anon_upload_enable=YES Just remove the leading # character in the last line, and save the file: anon_upload_enable=YES 4. Finally, restart the vsftpd service by using the Restart button in the Server Configuration dialog, or typing the following at the command line: # service vsftpd restart That’s it. Now we’re ready to test this configuration. Using an FTP Client to Test Anonymous Write Access So, let’s test our configuration with another simple session on our FTP client: 1. Connect to the client and log in (using the username anonymous or ftp) as you did before: $ 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): anonymous 283

Hint: If you are looking for very good and affordable webspace to host and run your tomcat hosting application check Sandzak.com tomcat web hosting provider