惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Attack and Defense Labs
Attack and Defense Labs
T
Threatpost
C
Cybersecurity and Infrastructure Security Agency CISA
H
Hackread – Cybersecurity News, Data Breaches, AI and More
I
Intezer
C
Cyber Attacks, Cyber Crime and Cyber Security
The Register - Security
The Register - Security
量子位
Security Latest
Security Latest
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
大猫的无限游戏
大猫的无限游戏
小众软件
小众软件
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
C
CXSECURITY Database RSS Feed - CXSecurity.com
MyScale Blog
MyScale Blog
J
Java Code Geeks
Apple Machine Learning Research
Apple Machine Learning Research
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
Spread Privacy
Spread Privacy
Jina AI
Jina AI
博客园 - 【当耐特】
P
Palo Alto Networks Blog
Last Week in AI
Last Week in AI
SecWiki News
SecWiki News
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
G
GRAHAM CLULEY
宝玉的分享
宝玉的分享
Hacker News - Newest:
Hacker News - Newest: "LLM"
T
The Blog of Author Tim Ferriss
V
Vulnerabilities – Threatpost
有赞技术团队
有赞技术团队
T
Tor Project blog
H
Hacker News: Front Page
A
Arctic Wolf
NISL@THU
NISL@THU
A
About on SuperTechFans
云风的 BLOG
云风的 BLOG
Engineering at Meta
Engineering at Meta
V
V2EX
N
News and Events Feed by Topic
Webroot Blog
Webroot Blog
Know Your Adversary
Know Your Adversary
P
Privacy International News Feed
I
InfoQ
D
Docker
L
LINUX DO - 最新话题
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
U
Unit 42

博客园 - simhare

Fix “Windows cannot access the specified device path or file” Error Domain Space mysql 登录后 修改密码 git delete repository php - func_get_args mysql key mul - 看不懂 mysql show create table `tablename` 查看建表语句 zend framework assumptions linux chkconfig pkill kill 看看自己是谁 linux 本地编码-如何解决乱码 linux添加用户-例如oracle 博文阅读密码验证 - 博客园 yum 只下载不安装 mysql netstat linux pts tty linux pts Linux 启动 进入单用户模式 其他用户无法连接 apache start stop
linux vsftpd
simhare · 2013-05-04 · via 博客园 - simhare

vsftpd有三种访问方式:匿名用户,本地用户和虚拟用户

[root@DBSVR02 ~]# vim /etc/vsftpd/vsftpd.conf
[root@DBSVR02 ~]# vim /etc/vsftpd/ftpusers
[root@DBSVR02 ~]# vim /etc/vsftpd/user_list

======================================

C:\Users\Administrator>ftp 168.168.80.9
连接到 168.168.80.9。
220 (vsFTPd 2.2.2)
用户(168.168.80.9:(none)): root
331 Please specify the password.
密码:
500 OOPS: cannot change directory:/root
500 OOPS: priv_sock_get_cmd
远程主机关闭连接。

C:\Users\Administrator>
=====================================
[root@DBSVR02 home]# useradd -d /home/ftp_usr ftp_usr
=====================================
ftp> user
用户名 ftp_usr
331 Please specify the password.
密码:
500 OOPS: cannot change directory:/home/ftp_usr
500 OOPS: priv_sock_get_cmd
远程主机关闭连接。
ftp>
=====================================
[root@DBSVR02 vsftpd]# userdel ftp_usr
[root@DBSVR02 vsftpd]# ll /home
total 4
drwx------. 2 500 500 4096 May  4 04:05 ftp_usr
[root@DBSVR02 vsftpd]#
=====================================
[root@DBSVR02 vsftpd]# userdel -rf ftp_usr
userdel: user 'ftp_usr' does not exist
[root@DBSVR02 vsftpd]# useradd -d /home/ftp_usr/ ftp_usr
useradd: warning: the home directory already exists.
Not copying any file from skel directory into it.
Creating mailbox file: File exists
[root@DBSVR02 vsftpd]# userdel -rf ftp_usr
[root@DBSVR02 vsftpd]# ll /home/ftp_usr
ls: cannot access /home/ftp_usr: No such file or directory
[root@DBSVR02 vsftpd]#
============================================
原来只能将ftp用户建立在/var/ftp下
[root@DBSVR02 vsftpd]# useradd -d /var/ftp/ftp_usr ftp_usr
[root@DBSVR02 vsftpd]# passwd ftp_usr
Changing password for user ftp_usr.
New password:
BAD PASSWORD: it is based on a dictionary word
Retype new password:
passwd: all authentication tokens updated successfully.
[root@DBSVR02 vsftpd]#

C:\Users\Administrator>ftp 168.168.80.9
连接到 168.168.80.9。
220 (vsFTPd 2.2.2)
用户(168.168.80.9:(none)): ftp_usr
331 Please specify the password.
密码:
230 Login successful.
ftp>

ftp> put test.txt
200 PORT command successful. Consider using PASV.
553 Could not create file.
ftp>
=================================
可以下载,不能上传。
[root@DBSVR02 ftp_usr]# id ftp_usr
uid=500(ftp_usr) gid=500(ftp_usr) groups=500(ftp_usr)
[root@DBSVR02 ftp_usr]#

===============================
[root@DBSVR02 ftp_usr]# usermod -a -G ftp ftp_usr
[root@DBSVR02 ftp_usr]# cat /etc/passwd | grep ftp
ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
ftp_usr:x:500:500::/var/ftp/pub/ftp_usr:/bin/bash
[root@DBSVR02 ftp_usr]# usermod -g ftp ftp_usr
[root@DBSVR02 ftp_usr]# cat /etc/passwd | grep ftp
ftp:x:14:50:FTP User:/var/ftp:/sbin/nologin
ftp_usr:x:500:50::/var/ftp/pub/ftp_usr:/bin/bash
[root@DBSVR02 ftp_usr]# id ftp_usr
uid=500(ftp_usr) gid=50(ftp) groups=50(ftp)
[root@DBSVR02 ftp_usr]#
=============================
搞到最后,原来是SELinux的问题,setenforce 1就可以了: