VSFTPD实现用户权限不能删除 只能上传、下载
2017-08-21 13:15
507 查看
点击(此处)折叠或打开
1、只能上传。不能下载、删除、重命名。
cmds_allowed=FEAT,REST,CWD,LIST,MDTM,MKD,NLST,PASS,PASV,PORT,PWD,QUIT,RMD,SIZE,STOR,TYPE,USER,ACCT,APPE,CDUP,HELP,MODE,NOOP,REIN,STAT,STOU,STRU,SYST
方法2:
chown_uploads=YES
chown_username=root
2、只能下载。不能上传、删除、重命名。write_enable=NO
3、只能上传、删除、重命名。不能下载。download_enable=NO
4、只能下载、删除、重命名。不能上传。
cmds_allowed=FEAT,REST,CWD,LIST,MDTM,MKD,NLST,PASS,PASV,PORT,PWD,QUIT,RMD,RNFR,RNTO,RETR,DELE,SIZE,TYPE,USER,ACCT,APPE,CDUP,HELP,MODE,NOOP,REIN,STAT,STOU,STRU,SYST
以上的2、3两点好控制,可是1和4就不是那么好控制了!
这个命令就实现了只能下载上传、不能删除了。具体命令介绍如下:
CWD - change working directory 更改目录
LIST - list remote files 列目录
MKD - make a remote directory 新建文件
NLST - name list of remote directory
PWD - print working directory 显示当前工作目录
RETR - retrieve a remote file 下载文件
STOR - store a file on the remote host 上传文件
DELE - delete a remote file 删除文件
RMD - remove a remote directory 删除目录
RNFR - rename from 重命名
RNTO - rename to 重命名
以上是常用的一些参数,大家对照学习一下!下面是列也的全部参数,供大家参考!
# 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
点击(此处)折叠或打开
[root@vm-nginx01 ~]# cat
/etc/vsftpd/vsftpd.conf
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=002
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
listen_port=3332
listen=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
anon_upload_enable=NO
anon_mkdir_write_enable=NO
anon_other_write_enable=NO
connect_timeout=60
idle_session_timeout=300
use_localtime=YES
banner_file=/opt/nginxlog/banner.ftp
chroot_local_user=YES
chroot_list_file=/etc/vsFTPd.chroot_list
local_root=/web/website/xiazai
#cmds_allowed=FEAT,REST,CWD,LIST,MDTM,MKD,NLST,PASS,PASV,PORT,PWD,QUIT,RMD,SIZE,STOR,TYPE,USER,ACCT,APPE,CDUP,HELP,MODE,NOOP,REIN,STAT,STOU,STRU,SYST
点击(此处)折叠或打开
server
{
listen 80;
server_name xiazai.man.com;
root /web/website/xiazai;
index index.php index.php5 index.htm;
access_log /opt/nginxlog/applog/xiazai.manzuo.com;
#error_log /opt/nginxlog/applog/error.jia;
charset utf-8;
limit_conn perip 10;
limit_rate 200k;
autoindex on;
#location ~ .*\.(gif|jpg|jpeg|png|bmp|wma|mp3|swf)$
location ~ .*\.*$
{
valid_referers none blocked server_names *.manzuo.com;
if ($invalid_referer) {return
403;}
expires 30d;
}
auth_basic "please input username and passwd!";
auth_basic_user_file /opt/app/nginx/conf/domain/xiazai.auth.conf;
}
1、只能上传。不能下载、删除、重命名。
cmds_allowed=FEAT,REST,CWD,LIST,MDTM,MKD,NLST,PASS,PASV,PORT,PWD,QUIT,RMD,SIZE,STOR,TYPE,USER,ACCT,APPE,CDUP,HELP,MODE,NOOP,REIN,STAT,STOU,STRU,SYST
方法2:
chown_uploads=YES
chown_username=root
2、只能下载。不能上传、删除、重命名。write_enable=NO
3、只能上传、删除、重命名。不能下载。download_enable=NO
4、只能下载、删除、重命名。不能上传。
cmds_allowed=FEAT,REST,CWD,LIST,MDTM,MKD,NLST,PASS,PASV,PORT,PWD,QUIT,RMD,RNFR,RNTO,RETR,DELE,SIZE,TYPE,USER,ACCT,APPE,CDUP,HELP,MODE,NOOP,REIN,STAT,STOU,STRU,SYST
以上的2、3两点好控制,可是1和4就不是那么好控制了!
这个命令就实现了只能下载上传、不能删除了。具体命令介绍如下:
CWD - change working directory 更改目录
LIST - list remote files 列目录
MKD - make a remote directory 新建文件
NLST - name list of remote directory
PWD - print working directory 显示当前工作目录
RETR - retrieve a remote file 下载文件
STOR - store a file on the remote host 上传文件
DELE - delete a remote file 删除文件
RMD - remove a remote directory 删除目录
RNFR - rename from 重命名
RNTO - rename to 重命名
以上是常用的一些参数,大家对照学习一下!下面是列也的全部参数,供大家参考!
# 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
点击(此处)折叠或打开
[root@vm-nginx01 ~]# cat
/etc/vsftpd/vsftpd.conf
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=002
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
listen_port=3332
listen=YES
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
anon_upload_enable=NO
anon_mkdir_write_enable=NO
anon_other_write_enable=NO
connect_timeout=60
idle_session_timeout=300
use_localtime=YES
banner_file=/opt/nginxlog/banner.ftp
chroot_local_user=YES
chroot_list_file=/etc/vsFTPd.chroot_list
local_root=/web/website/xiazai
#cmds_allowed=FEAT,REST,CWD,LIST,MDTM,MKD,NLST,PASS,PASV,PORT,PWD,QUIT,RMD,SIZE,STOR,TYPE,USER,ACCT,APPE,CDUP,HELP,MODE,NOOP,REIN,STAT,STOU,STRU,SYST
点击(此处)折叠或打开
server
{
listen 80;
server_name xiazai.man.com;
root /web/website/xiazai;
index index.php index.php5 index.htm;
access_log /opt/nginxlog/applog/xiazai.manzuo.com;
#error_log /opt/nginxlog/applog/error.jia;
charset utf-8;
limit_conn perip 10;
limit_rate 200k;
autoindex on;
#location ~ .*\.(gif|jpg|jpeg|png|bmp|wma|mp3|swf)$
location ~ .*\.*$
{
valid_referers none blocked server_names *.manzuo.com;
if ($invalid_referer) {return
403;}
expires 30d;
}
auth_basic "please input username and passwd!";
auth_basic_user_file /opt/app/nginx/conf/domain/xiazai.auth.conf;
}
相关文章推荐
- 如何用vsftpd实现用户不同权限:只能下载,可上传,管理权限等
- vsftp实现只能上传不能下载、删除权限配置
- vsftp实现只能上传不能下载、删除权限配置
- vsftpd实现匿名用户只能上传不能下载
- vsftpd匿名用户只能上传不能下载
- CENTOS5下VSFTPD的设置(虚拟用户分下载用户/下载、上传但不能删除用户/管理用户)
- CENTOS5下VSFTPD的设置(虚拟用户分下载用户/下载、上传但不能删除用户/管理用户)
- 使用vsftpd让匿名用户可以具有上传、下载、删除权限
- vsftpd 只能上传不能删除
- vsftpd 实现匿名上传,下载,删除
- Vsftpd 虚拟用户实现公司各部门文件的上传下载
- Linux系统服务 6 ---- vsftpd服务的配置文件实现匿名登录上传下载和删除功能
- 探究ftp的奥妙之系统用户如何上传下载文件、vsftpd如何识别证书并利用客户端来实现远程连接传输
- vsftpd 匿名用户能下载,不能上传文件
- vsftp实现匿名用户文件可上传不能删除或覆盖
- vsftpd配置本地用户有所有权限,匿名用户只能下载
- vsftp实现匿名用户文件可上传不能删除或覆盖
- vsftpd 实现上传和下载的权限分离
- 控制Samba用户只能上传不能删除
- Java利用apache ftp工具实现文件上传下载和删除功能