Tutorial on advanced configuration of FTP server in IIS in Windows

Source: Internet
Author: User
Tags ftp site ntfs permissions

When talking about FTP servers, you may think of software such as Serv-U and vs-FTP. In fact, Microsoft's built-in FTP service in IIS is enough. If you don't believe it, please read it.
Implement Multi-User Management

First, cancel "site properties/Allow anonymous connections", 1.

Next, go to "Computer Management/local users and groups" and create a new group. Here, create FTPuser, create a user FTP01, and modify the attributes of FTP01, add it to the FTPuser group and remove the default users Group. Create the FTP01 and FTP02 folders under the NTFS format partition (drive D here), and set security permissions to 2.

Set the permissions of the FTP02 folder to full control of FTP02. Of course, you can assign different permissions to different users as needed. Return to the IIS manager, select an FTP site "New/virtual directory/next", enter FTP01 In the alias, select "Next", select the newly created FTP01 directory, and select "Next ", create a new virtual directory FTP02 with the path pointing to the FTP02 directory. Note that the three aliases must be exactly the same as the directory name and user name.

Test: the IP address 192.168.0.16 is used as an example. Enter FTP: // 192.168.0.16 and press enter to enter the user and password, and enter FTP01 and its password, at this time, you can only access the FTP01 virtual directory. You can upload a file and check the directory on the server to determine which file is placed. Similarly, if you log on with FTP02, you will be directed to the FTP02 directory. Users are restricted from accessing others' directories in their own directories, which ensures security. If you need to be able to change your password, you only need to do not select the option 3 shown in Figure 3 when creating the user.

TIPS:
How to change the FTP account password on the client:
Enter:
FTP 192.168.0.16
Enter User Name
Enter Password
Enter quote "site pswd old password new password"
Advantages of this method: Combined with NTFS permissions and disk quota, the diversified management of multiple users can be achieved.
Disadvantages of this method: Because the FTP user password is transmitted in plain text on the network, it is not safe. Unfortunately, the FTP service built in IIS does not support SSL, this is not comparable to Serv-U.

Implement the link function in Serv-U

This is achieved by using the principle of path resolution, which is a hidden function of MS-FTP. First, create a folder named tools under the root directory of the FTP site (disk D here). in IIS manager, create a virtual directory named tools under the FTP site, path to the "tool" directory under drive F. Note that the virtual directory name must be the same as the folder name created under the root directory of the site.

When logging on to the client, you cannot use FTP01 or FTP02 to log on, because they log on directly to the corresponding subdirectory under the root directory of the site and cannot go back to the root directory of the site, therefore, only new users can be created. Here I have created an FTP03 user. After logging in, I found that there are other directories besides the FTP01 and FTP02 directories, but FTP01 is set in front, FTP02 directory permissions, so FTP03 can not access them, just know the existence of these directories. Click the tools directory and you will find that it automatically points to the "tools" directory under the f disk of the server.

Advantages of this method: the link function is implemented without a third-party tool and is particularly useful when multiple drives are available. If you want to link to a complete partition, you can create a folder under the root directory of the site with the same name and drive letter.

Disadvantages of this method: You need to create additional users. If FTP01 and other users want to browse the content on other disks, it is very difficult.

Automatically update the FTP site directory and file list

Windows has a very useful command tree to show its skills here. If the root directory of the FTP site is d, we only need to create a batch file with the following content:
Tree/f/a d:> d: FTP.txt

Then add a task plan to run every hour. It is worth noting that you must perform advanced settings after adding a task, as shown in figure 4.

After this configuration, the user can download the ftp.txt file locally to check whether the file has been updated. This can save the user time for searching for updates in a directory, especially when the network speed is slow. To extend this function, you can save your time by using another useful Windows Command fc to compile the following batch file FTP update. bat:
Tree/f/a d:> d: FTPnew.txt
Fc/L d: FTP.txt d: FTPnew.txt> d: ftp .txt

Expired. If there is an update, it will start with *** and end with *** to indicate which directory has been updated and all updated file names are listed, isn't it even more. The hosts file should not appear in the root directory of the site, or be directed to another location when editing commands.

The directory where the hosts file is located, so we can directly browse the file through the browser, because IE can directly parse the txt file, so there is no prompt to download. For better convenience, you can also add FTP update. bat. The complete FTP update. bat content is as follows:
Tree/f/a d:> d: FTPnew.txt
Fc/L d: FTP.txt d: FTPnew.txt> d: ftp .txt
Echo Update Time> d: ftpupdate cmd.txt
Date/t> d: ftpupdate example .txt
Time/t> d: ftpupdate example .txt

Then add a scheduled task and execute the batch file every hour. In this way, the viewer not only sees the updated content, but also knows the update time. The next update time can also be calculated by himself. If you log on to this FTP site frequently, you can add this address to your favorites. You do not need to log on to FTP to check whether the server has been updated. If you are interested, visit http://test.yuanlin.cn/ftp?update.txt to see the effect.

All of the tools involved above are built on Windows, and no third-party tools are used. In fact, there are still many places worth exploring in Windows.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.