FTP 服务安装
来源:互联网 发布:膜法世家绿豆面膜知乎 编辑:程序博客网 时间:2024/06/05 17:56
FTP service setup
Setup vsftpd
sudo apt-get install vsftpd -y
Start vsftpd
- check whether the port 21 is working
sudo netstat -nltp | grep 21
- if the above not start, you can do it manually
sudo systemctl start vsftpd.service
- check whether the port 21 is working
Config the User directory
- make a directory
sudo mkdir /home/uftp
- make a welcome file
sudo touch /home/uftp/welcome.txt
- config user and create passwd
sudo useradd -d /home/uftp -s /bin/bash uftp
sudo passwd uftp
- remove the file to avoid login failed.
sudo rm /etc/pam.d/vsftpd
- make a directory
Do some limitation
- make the user only access the ftp instead of login the server
sudo usermod -s /sbin/nologin uftp
config again
sudo chmod a+w /etc/vsftpd.conf
# 限制用户对主目录以外目录访问chroot_local_user=YES# 指定一个 userlist 存放允许访问 ftp 的用户列表userlist_deny=NOuserlist_enable=YES# 记录允许访问 ftp 用户列表userlist_file=/etc/vsftpd.user_list# 不配置可能导致莫名的530问题seccomp_sandbox=NO# 允许文件上传write_enable=YES# 使用utf8编码utf8_filesystem=YES
- create the access file for user list
sudo touch /etc/vsftpd.user_list
sudo chmod a+w /etc/vsftpd.user_list
modify the user_list as followed:uftp
- create the access file for user list
config the access authority
- the main dir only read
sudo chmod a-w /home/uftp
- the pulic dir can be read and wrote
sudo mkdir /home/uftp/public && sudo chmod 777 -R /home/uftp/public
- restart the service
sudo systemctl restart vsftpd.service
- make the user only access the ftp instead of login the server
Prepare the domain and just make the analyze ip then everything will be ok.
阅读全文
1 0
- ftp服务的安装
- 安装linux ftp服务
- 安装linux ftp服务
- ubuntu安装ftp服务
- FTP服务的安装
- linux安装ftp服务
- ubuntu 安装ftp服务
- redhat安装ftp服务
- linux安装ftp服务
- CentOS 安装FTP服务
- ftp服务安装
- CentOS7安装FTP服务
- linux 安装 ftp 服务
- 安装FTP服务
- FTP 服务安装
- centos6安装ftp服务
- Ubuntu 安装配置FTP服务
- ubuntu安装配置ftp服务
- js实现鼠标滑动背景跟随
- SETP7 Basic V11 SP2
- 归并排序-Java
- 55. Jump Game
- Servlet的生命周期
- FTP 服务安装
- 来两幅美图
- 在客户端输入URL到页面返回,发生了什么?
- 机器学习人工智能,数学基础知识
- 相册选取图片插入到EditText中,实现图文混排
- h5+vue video使用
- shell——排序(sort)
- 我的第三篇博客
- selenium与selenium在scrapy中的集成