Skip to content

Instantly share code, notes, and snippets.

@lizhengnacl
Created January 22, 2021 02:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lizhengnacl/6303a6f8c6e00c7d4234b00bc10accb0 to your computer and use it in GitHub Desktop.
Save lizhengnacl/6303a6f8c6e00c7d4234b00bc10accb0 to your computer and use it in GitHub Desktop.
macOS配置FTP服务器
## macOS 系统版本 10.15.7
## 安装
```
brew install vsftpd
```
## 授权
```
sudo chown root /usr/local/etc/vsftpd.conf
```
## 修改配置
```
sudo vi /usr/local/etc/vsftpd.conf
# 增加配置项
# 启用匿名
anonymous_enable=YES
# 设置匿名访问路径,根据实际FTP路径设置
secure_chroot_dir=/Users/didi/share/
anon_root=/Users/didi/share/
```
## 启动
直接启动
```
sudo vsftpd
```
后台启动
```
sudo brew services start vsftpd
```
## 调试
```
ftp localhost
```
## 参考资料
- [安装教程](https://formulae.brew.sh/formula/vsftpd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment