Instead of having /var/ftp as their (Web hosting india) root directory,
Instead of having /var/ftp as their root directory, however, real users have / as their root directory and their regular home directories (such as /home/user, where user is the user name) as their current directory when they log in. Unlike the anonymous user, the real user has no special restrictions with regard to the file system. Whatever they can access when they log in through a regular login prompt can be accessed when they log in through FTP. No special configuration needs to be done in the /etc/ftpaccess file to allow a user with a real account to connect to the server through FTP. However, if by some chance a user or a group fell into a guestuser or guestgroup definition you set up, you could redefine that user or group as real again by setting a realuser or realgroup value for the user or group, respectively. Tip To prevent any real user from using the FTP service, you can simply add the person s user name to the /etc/ftpusers list. By default, these users are excluded because they are on this list: root, bin, daemon, adm, lp, sync, shutdown, halt, mail, news, uucp, operator, games, and nobody. Most of those users are administrative accounts that could be exploited. In the /etc/ftpaccess file, all administrative accounts except the ftp user and group are denied access to the FTP service by default. Guest users A guest user is sort of halfway between a real user and an anonymous user. You can assign any name as a guest user. However, the guest user is limited to a restricted area of the file system, typically the user s home directory. Using guest user accounts is a great way to give specific users permission to add files to and remove them from a specific part of your file system but not allow them to do much else. This is useful, for example, if you want to give users a place to set up their own Web pages. In general terms, an FTP guest user will have an account set up in the Linux /etc/passwd file, then that user will be defined as either a guestuser or guestgroup in the /etc/ftpaccess file. The following is an example of how to set up an FTP guest user account: 1. Add the user account as you would normally. For example, to add a user named mike with a home directory of /home/mike, type the following (as root user): # useradd mike 2. Add a password for mike using the passwd command (entering it twice, as prompted): # passwd mike Changing password for user mike New UNIX password:******** Retype new UNIX password: ******** 3. Edit the user s account information in /etc/passwd so that the user s root directory is changed to the restricted directory (for example, the user s /home directory). Here is an example of how that new entry would look for the user named mike: mike:x:501:501:guest acct:/home/mike/./pub:/etc/ftponly The dot (.) after /home/mike makes the /home/mike directory on the FTP server the root directory for mike. When mike logs in, his current directory is /home/mike/pub. The /etc/ftponly value prevents a shell from starting up (such as /bin/bash) if mike were to log in from a regular Linux prompt. 4.
Visit our web design programs services for an affordable and reliable webhost to suit all your needs.