1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > 国产银河麒麟服务器vsftp匿名用户本地用户的一般设置

国产银河麒麟服务器vsftp匿名用户本地用户的一般设置

时间:2021-12-14 13:52:25

相关推荐

国产银河麒麟服务器vsftp匿名用户本地用户的一般设置

使用银河麒麟V10-sp1服务器来搭建FTP服务器。

安装vsftp

yum install vsftpd(装机镜像有包)

安装ftp客户端(可选,互联网源有)

yum install ftp

启动 systemctl start vsftpd

关闭防火墙

配置文件/etc/vsftpd/vsftpd.conf

1、匿名用户模式

客户端使用ftp用户登录,不需要密码。

文件需要有o+r权限,客户端才能下载

客户端上传文件。创建一个文件夹加上o+w权限设置 write_enable=YES

anonymous_enable=YES #允许匿名用户登录FTPanon_root=/var/ftp/pub #设置匿名用户的登录目录默认是这个目录anon_upload_enable=YES #打开匿名用户的上传权限anon_mkdir_write_enable=YES #打开匿名用户创建目录的权限anon_other_write_enable=YES#打开匿名用户删除和重命名的权限anon_umask=022 #匿名用户的掩码

2、本地用户

local_root=/var/ftp #修改本地用户的默认ftp目录,默认是用户家目录

默认本地用户可以通过ftp登录到服务器,进行系统目录切换。可通过如下方法禁止登录ftp用户切换系统目录

chroot_local_user=YESchroot_list_enable=YESchroot_list_file=/etc/vsftpd/chroot_list #可以进行系统目录访问的用户列表allow_writeable_chroot=YES##创建chroot_list名单,开放只要把用户名写入文件即可,一行一个用户touch /etc/vsftpd/chroot_list

----用户权限实现多用户管理ftp,如上传和下载权限分开

添加user_config_dir=/etc/vsftpd/user_conf

mkdir /etc/vsftpd/user_conf

给用户添加权限,如使某个用户不能删除文件,在/etc/vsftpd/user_conf目录下建配置文件,用用户命名。

如 vim /etc/vsftpd/user_conf/wu

添加cmds_denied=DELE,RMD,实现不能删除的文件或者文件夹的功能

多用户会有目录权限的问题,可以设置local_umask=000解决

以下一些常用控制。

local_root= 可以更改用户的ftp目录

local_max_rate= 限制此用户带宽.

cmds_denied= 此用户不可以使用的指令,多个用逗号隔开

cmds_allowed= 此用户可以使用的指令

具体操作参见如下

# ABOR - abort a file transfer# CWD - change working directory# DELE - delete a remote file# LIST - list remote files# MDTM - return the modification time of a file# MKD - make a remote directory# NLST - name list of remote directory# PASS - send password# PASV - enter passive mode# PORT - open a data port# PWD - print working directory# QUIT - terminate the connection# RETR - retrieve a remote file# RMD - remove a remote directory# RNFR - rename from# RNTO - rename to# SITE - site-specific commands# SIZE - return the size of a file# STOR - store a file on the remote host# TYPE - set transfer type# USER - send username# less common commands:# ACCT* - send account information# APPE - append to a remote file# CDUP - CWD to the parent of the current directory# HELP - return help on using the server# MODE - set transfer mode# NOOP - do nothing# REIN* - reinitialize the connection# STAT - return server status# STOU - store a file uniquely# STRU - set file transfer structure# SYST - return system type

3、虚拟用户

。。。

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。