Advanced Configuration of FTP server in Windows IIS _win Server

Source: Internet
Author: User
Tags ftp site ntfs permissions
mentioned FTP server, may be thought of serv-u, vs-ftp and other software, in fact, Microsoft built in IIS FTP service is enough, do not believe to look down.
To manage multiple users

First you need to cancel the "Site Properties/Allow anonymous connections", as shown in Figure 1.


Then enter the "Computer Management/Local Users and Groups", a new group, set up here as Ftpuser, and then create a new user FTP01, and then modify the FTP01 attributes, add it to the Ftpuser group, remove the system default Users group. Create folders FTP01 and FTP02 under NTFS-formatted partitions (here for D disk), and then set security permissions, as shown in Figure 2.


Also set the folder FTP02 permissions for FTP02 Full Control, of course, here can be distributed according to the actual situation different users different permissions. Back to IIS Manager, select an FTP Site "new/virtual directory/Next" to enter FTP01 at the alias, select "Next", the path to select the FTP01 directory you just created, select Next, and create a new virtual directory FTP02 with the path to the FTP02 directory. Note here that the alias and directory name, and the username 3 must be exactly the same.

Test: Here to IP for example, input FTP://192.168.0.16, carriage return, prompt input user and password, enter FTP01 and its password, smooth entry, at this time can only be FTP01 virtual directory, can upload a file, Then look at the server to see which directory is placed in the decision. Similarly, to FTP02 login, entered the FTP02 directory, users are limited to their own directory can not access other people's directory, security is guaranteed. If the user needs to be able to change his or her password, it is only necessary to create a user without selecting the option shown in Figure 3.


Small tip:
How the client modifies the password for the FTP account:
At the command prompt, enter:
FTP 192.168.0.16
Enter user name
Enter password
Enter Quote "site pswd old password new password"
Advantages of this method: The combination of NTFS permissions and disk quotas can be a good way to achieve multiple user diversification management.
The disadvantage of this method is that because the FTP user password is transmitted on the network in clear text, it is not very safe, unfortunately, the IIS built-in FTP service does not support SSL, which is not comparable to serv-u.

Implementing the link functionality in Serv-u

This is achieved by using the principle of path parsing, which is a hidden function of ms-ftp. First create a folder under the FTP site root directory (here for D disk), called Tools, and in IIS Manager, create a virtual directory under the FTP site named tools, which points to the tools directory under F disk. Note that the virtual directory name must be the same as the folder name created under the site root directory.

Login at the client, this time can not use FTP01, FTP02 login, because they are logged in directly to the site root directory under the corresponding subdirectory, and can not go back to the site root directory, so can only create new users, here I created a FTP03 user, Log in to find other directories, in addition to visible FTP01, FTP02 directories, but previously set permissions on the FTP01,FTP02 directory, so FTP03 cannot access them, just knowing the existence of these directories. Click on the Tools directory and you will find that the "tools" directory is automatically pointed to the server under F disk.

The advantage of this method is that linking is not implemented without Third-party tools and is especially useful when multiple drives are available. If you want to link to a full partition, create a folder in the root directory of the site with the same name and drive letter.

The disadvantage of this method is that you need to create additional users, and it's very difficult for users like FTP01 to browse the contents of other disks.

Automatically update FTP site directory and file list

Windows has a very useful command. Tree is here to work. If the FTP site root directory is d, we simply create a batch file that reads
tree/f/A D: >d:ftp.txt

Then add a task schedule that runs once per hour. It is worth noting that you must make advanced settings after you add a task, as shown in Figure 4.


This set up, the user can log in first download FTP.txt this file to see if there is an update, this can save users a directory to find updates of the time, especially the slow speed of the case. To expand this, you can save users more time, or rely on Windows another useful command FC, write the following batch file FTP update. BAT:
tree/f/A D: >d:ftpnew.txt
FC/L d:ftp.txt d:ftpnew.txt >d:ftp update list. txt

Then run the previous write Ftp.bat, and then run an FTP update. BAT, you can view the FTP update list. txt, if there is an update, will be the beginning of * * * * * end of the form to indicate which directory has updated, updated file name is listed, Is it more clear? Users only need to download the FTP update list. txt view on it, of course, the user has browsed this FTP site, the first browsing download FTP.txt on it, if the FTPnew.txt this file should not appear in the site root directory, you can also edit the command point to other locations.

Now in the Forum also see a lot of FTP list, manual maintenance is very troublesome, Just put the FTP update list. txt in a Web path or to create a virtual directory to point to FTP update list. txt directory, then we can browse the file directly through the browser, because IE browser can directly parse TXT file, so will not be prompted to download. In order to better facilitate the viewer can also update the FTP. BAT, 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 update list. txt
echo Update time >> d:ftp update list. txt
date/t >> d:ftp update list. txt
time/t >> d:ftp update list. txt

Then add a scheduled task and execute the batch file hourly, so that the viewer not only sees the updated content, but also knows the time of the update, and the next update time can be calculated on its own. If you often log in to this FTP site, you can also add this address to the Favorites folder, do not have to log on to FTP can also know whether the server has updates, interested in Access to Http://test.yuanlin.cn/FTP List update. txt look at the effect.

All the tools mentioned above are brought by Windows, and there are many places in windows that are worth digging for without using any third-party tools.

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.