Copy the sample ftponly file to /etc and (How to cite a web site)

Copy the sample ftponly file to /etc and make it executable as follows: # cp /usr/share/doc/wu-ftpd*/examples/ftponly /etc/ # chmod 755 /etc/ftponly 5. Add the line /etc/ftponly to the /etc/shells file. 6. Create directories needed for the guest user s home directory to have everything FTP needs to work properly. To do this, I just copied everything from the /var/ftp directory structure (as root user) to my guest user s home directory (/home/mike). After that, I changed group assignment of /home/mike/pub to mike: # cp -r /var/ftp/* /home/mike # chgrp mike /home/mike/pub 7. Add the necessary definitions to /etc/ftpaccess. At the very least, you need to define the user as a guest login. For example, to define mike as a guest login, add the following to /etc/ftpaccess: guestuser mike Cross-Reference With just guestuser mike defined, the user mike has /home/mike as his root directory and he can get files (but not put them on the server). Also, he can browse the directory structure below /home/mike only. To add to or change permissions, see the section on controlling FTP access later in this chapter. At this point, the guest user can use the ftp command to connect to the server and have access to only those files and directories that are under the user s restricted directory. Setting Up FTP Directories, Message Files, and Greetings As an FTP site administrator, you are responsible for setting up the directory structure used on your site. You also have an opportunity to make the navigation of your site easier for users by providing a variety of message files and README files on your site and to change the greetings on your FTP server. The following sections describe these features. Creating the FTP directory structure Because you are providing a limited view of the file system to those who use your FTP service, you must provide everything they need within the root file system that they can access (typically, /var/ftp). How to set up the minimal directory structure for FTP is described in the section on setting up guest users. A viable directory structure is provided in the /var/ftp directory when you install the FTP service in Red Hat Linux (specifically, the anonftp package). After that, most of what you want to share with the public can be arranged in the /pub directory structure that you create. For directories containing information that is restricted to certain classes of user, you may want to create a different root directory (such as /local). Specific directories can be included or excluded within the directory structure using a variety of parameters in the /etc/ftpaccess file. You can choose which directories allow upload and download. You can also set whether users can rename, delete, overwrite, or change permissions of files. See the sections on controlling FTP access for further information on setting up user directories and files.
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.

Leave a Reply