1. 开启 FTP 和 IIS 服务功能:
![](https://upload-images.jianshu.io/upload_images/10338402-57f77eb015b7fb78.png?imageMogr2/auto-orient/strip|imageView2/2/w/757)
2. 添加新用户:
打开计算机管理界面:
![](https://upload-images.jianshu.io/upload_images/10338402-93d0ac9ac7abeff9.png?imageMogr2/auto-orient/strip|imageView2/2/w/383)
展开“本地用户与组”:
![](https://upload-images.jianshu.io/upload_images/10338402-766ad370de36f77d.png?imageMogr2/auto-orient/strip|imageView2/2/w/700)
邮件点击“用户”-》点击“创建新用户”:
![](https://upload-images.jianshu.io/upload_images/10338402-06682c111ac07924.png?imageMogr2/auto-orient/strip|imageView2/2/w/325)
在创建新用户对话框输入用户名和密码,并设置密码更新策略:
![](https://upload-images.jianshu.io/upload_images/10338402-3789d0639f21dd01.png?imageMogr2/auto-orient/strip|imageView2/2/w/695)
为了避免麻烦,我直接设置了“用户不能改密码”和“用户密码永远不过期”。
3. 配置新用户:
在用户组里面右键新建用户,打开属性对话框:
![](https://upload-images.jianshu.io/upload_images/10338402-a00bcb5b23adabd1.png?imageMogr2/auto-orient/strip|imageView2/2/w/648)
![](https://upload-images.jianshu.io/upload_images/10338402-2bd8383232ce73ee.png?imageMogr2/auto-orient/strip|imageView2/2/w/701)
删除Users,并且添加Guests Group:
![](https://upload-images.jianshu.io/upload_images/10338402-a228b33c3ef85be4.png?imageMogr2/auto-orient/strip|imageView2/2/w/887)
设置完以后是这样的:
![](https://upload-images.jianshu.io/upload_images/10338402-b0e48abcc23e70c7.png?imageMogr2/auto-orient/strip|imageView2/2/w/981)
其实这个Guests组原本也是不安全的,但致少比Users组要好,最好是自己在建用户之前,新建一个专门用于FTP站点的组。
因为Win7默认是禁止Guests组的,所以我们要启用这个组哦。去掉“Account is disabled”这个复选框就可以了:
![](https://upload-images.jianshu.io/upload_images/10338402-570c5d0ac744e6ac.png?imageMogr2/auto-orient/strip|imageView2/2/w/904)
4. 创建FTP服务器站点:
在Windows中输入"iis", 选择第一个程序打开IIS 管理器界面:
![](https://upload-images.jianshu.io/upload_images/10338402-420527b47a738aa7.png?imageMogr2/auto-orient/strip|imageView2/2/w/374)
展开机器名下面的Site文件夹,右键选择“新建FTP站点”:
![](https://upload-images.jianshu.io/upload_images/10338402-7cf8ebe388b4395f.png?imageMogr2/auto-orient/strip|imageView2/2/w/661)
5. 输入站点基本信息:
![](https://upload-images.jianshu.io/upload_images/10338402-631d73939c9a94af.png?imageMogr2/auto-orient/strip|imageView2/2/w/809)
6. 配置站点绑定和SSL设置:
![](https://upload-images.jianshu.io/upload_images/10338402-e28b6924f97f0125.png?imageMogr2/auto-orient/strip|imageView2/2/w/812)
这个IP地址我选择的是机器的IP,而且这个IP要是固定的哦。
设置自启动FTP站点,这样每次开机后ftp站点就会随之开启。
然后设置不需要SSL验证。
7. 配置授权信息:
![](https://upload-images.jianshu.io/upload_images/10338402-c239d9af500044b1.png?imageMogr2/auto-orient/strip|imageView2/2/w/819)
我这里是授权给指定用户“vicky”,而且有读写权限。(因为项目有需求向这个FTP站点写入内容哦)
如果你们只是测试用,就在“Allow access to”那里选择“All users”,然后只给读权限。
建好之后的站点是这样滴:
![](https://upload-images.jianshu.io/upload_images/10338402-3fd62ad0cb1ddb78.png?imageMogr2/auto-orient/strip|imageView2/2/w/954)
设置这个站点的链接方式:
![](https://upload-images.jianshu.io/upload_images/10338402-941e2f267c5454a1.png?imageMogr2/auto-orient/strip|imageView2/2/w/1196)
测试设置是否成功:
![](https://upload-images.jianshu.io/upload_images/10338402-989c7d584c5a27bf.png?imageMogr2/auto-orient/strip|imageView2/2/w/976)
8. 在FTP site Path路径下新建一个文件用于测试:
![](https://upload-images.jianshu.io/upload_images/10338402-b28e61c852eb348d.png?imageMogr2/auto-orient/strip|imageView2/2/w/794)
9. 配置文件夹权限:
组织-》属性-》安全-》高级-》改变权限:
![](https://upload-images.jianshu.io/upload_images/10338402-29621c2fe6024bff.png?imageMogr2/auto-orient/strip|imageView2/2/w/1096)
添加之前创建的用户:(注意选择location是我们创建这个用户的时候选择的域哦,我这里直接选择机器名,因为这就是我之前选择的域。然后点击检查名字,系统就自动将用户名戴上了域名)
![](https://upload-images.jianshu.io/upload_images/10338402-820c0f6d360f8649.png?imageMogr2/auto-orient/strip|imageView2/2/w/1061)
点击OK后天厨选择权限对话框,在对话框中根据项目实际需求选择权限哦,一般不要像我一项给这么多权限:
![](https://upload-images.jianshu.io/upload_images/10338402-d4bf6e1aa17bfdd8.png?imageMogr2/auto-orient/strip|imageView2/2/w/487)
添加好以后多了一个有权限的实例:
![](https://upload-images.jianshu.io/upload_images/10338402-03fcd1e5b93b314c.png?imageMogr2/auto-orient/strip|imageView2/2/w/755)
![](https://upload-images.jianshu.io/upload_images/10338402-ee11aa16e6237d9b.png?imageMogr2/auto-orient/strip|imageView2/2/w/819)
上面的设置也可以从FTP站点打开:
![](https://upload-images.jianshu.io/upload_images/10338402-f18e7fb7ce721a58.png?imageMogr2/auto-orient/strip|imageView2/2/w/389)
![](https://upload-images.jianshu.io/upload_images/10338402-76fffc8b9db98e98.png?imageMogr2/auto-orient/strip|imageView2/2/w/507)
10.测试站点:
在本机或其他电脑上输入ftp://ip address : port后回车:
会弹出登录对话框,需要输入指定的用户名和密码以后才能查看FTP站点的内容:
![](https://upload-images.jianshu.io/upload_images/10338402-043c32a2ae2d252c.png?imageMogr2/auto-orient/strip|imageView2/2/w/668)
登录以后看到的内容: