如何在mac上配置vsftpd
来源:互联网 发布:人肉软件 app 编辑:程序博客网 时间:2024/06/06 11:38
- 安装brew,用mac自带的mac下载,去https://brew.sh/index_zh-cn.html 复制命令
- 安装vsftpd: brew install vsftpd
brew安装完vsftpd后会给出以下提示:
To use chroot, vsftpd requires root privileges, so you will need to run
sudo vsftpd
.
You should be certain that you trust any software you grant root privileges.The vsftpd.conf file must be owned by root or vsftpd will refuse to start:
sudo chown root /usr/local/etc/vsftpd.confTo have launchd start vsftpd now and restart at startup:
sudo brew services start vsftpd
Or, if you don’t want/need a background service you can just run:
sudo vsftpd运行命令:sudo chown root /usr/local/etc/vsftpd.conf
修改配置文件vsftpd.conf:
local_enable=YES
write_enable=YES- 新建一个用户:ftp1,并设置密码。mac中不能使用命令useradd,所以要到系统偏好设置->用户与群主 中新增用户。
- 启动vaftpd:sudo brew services start vsftpd
- 在/etc/shells中新增/bin/false和/sbin/nologin,这样可以允许ftp登录,禁止ssh登录,如果没有这个需要可以不用设置。
- 用ftp1登录,可能会报以下错误
- 缺少某一个log文件,新建一个文件即可
- 缺少/usr/share/empty,新建这个文件夹会遇到一个问题,就是系统不允许在/usr下面新建文件夹,要想解决这个问题比较麻烦一点。需要关闭 Rootless:
- 重启mac按住 Command+R,进入恢复模式,打开Terminal。
csrutil disable
重启即可。如果要恢复默认,那么csrutil enable
- 重启mac按住 Command+R,进入恢复模式,打开Terminal。
10.重启vsftpd:sudo brew services restart vsftpd, 重新登录ftp1,报错: 331 Please specify the password. 530 Login incorrect.
解决方法:
- cd /etc/pam.d, 找到ftp server的名字,我找到的是ftpd。
在vsftpd.conf加上pam_service_name=ftpd
重启vsftpd
- 上述步骤完成之后就可以使用127.0.0.1访问该ftp服务器了。
- 如何在mac上配置vsftpd
- 在OpenBSD上配置vsftpd
- 如何在Mac上配置/使用Github
- 如何在Mac上配置/使用Github
- 如何在Mac pro上配置adb命令
- 在Mac pro上如何配置adb命令?
- 在mac上配置mysql
- 在mac上配置Adb
- 在Mac上配置tomcat
- 在mac上配置Zookeeper
- 在mac上配置php
- 在AWS Ubuntu 14.04上安装配置ftp服务器 vsftpd
- linux上安装配置vsftpd
- linux上安装配置vsftpd
- linux上安装配置vsftpd
- linux上安装配置vsftpd
- linux上安装配置vsftpd
- linux上安装配置vsftpd
- POJ 1584 A Round Peg in a Ground Hole(判断凸多边形,判断圆是否在凸多边形内)
- 2 浅谈Web开发中的“前后端分离”
- C语言来实现字符串反转 只有单词顺序反转,单词里的字母不反转
- java 插入背景图片的三种方法
- 《算法》笔记-2.5 应用
- 如何在mac上配置vsftpd
- leetcode No117. Populating Next Right Pointers in Each Node II
- Java语言基础——数据类型与数据类型转换
- PHP上传文件
- C语言主要应用领域,C和C++的区别,自上向下和自下向上设计思想
- 【深度学习笔记002 神经网络与主流框架】
- mt3
- 部署描述文件web.xml解析(五) 声明过滤器
- 【Struts2】Session的获取