日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

vsftp实现只能上传不能下载、删除权限配置

發布時間:2025/3/18 编程问答 23 豆豆
生活随笔 收集整理的這篇文章主要介紹了 vsftp实现只能上传不能下载、删除权限配置 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
vsftpd可以對每個用戶特別限制.
只要給那個用戶建立一個設置文件,然后在文件里設置

在vsftpd.conf里加
user_config_dir=/etc/vsftpd/vsftpd_user_conf,這是文件夾.當然你可以自己選把用戶文件放在哪
在此文件夾里新建一個文件,跟用戶名相同.VSFTPD會比對用戶名和用戶設置文件.

在文件里加
local_root=PATH to directory就可以更改用戶的home directory
local_max_rate=XXXX就可以限制此用戶的帶寬.
cmds_allowed=XXXXX, 此用戶可以使用的指令(注意: 這行里面不能換行,不能有空格)

# 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

參數說明:LIST 文件或目錄列表

STOR 存儲文件

MKD 創建目錄

CWD 改變目錄

ABOR 終止進程

REST 斷點續傳

--------------------------------------

在線使用的腳本

local_root=/home/dbbackup
cmds_allowed=MKD,LIST,PASV,ABOR,REST,NLST,RMD,RNFR,FNTO,SIZE,PORT,STOR,QUIT
local_max_rate=80000000

-----------------------------------------

前提配置文件中要開啟:

tcp_wrappers=YES


限制ip訪問,只使用hosts.allow文件即可,不用動hosts.deny文件

vsftpd:222.90.72.87 61.150.91.10:allow

vsftpd:all:deny


轉自: http://kaoshi.china.com/linux/learning/736913-1.htm



總結

以上是生活随笔為你收集整理的vsftp实现只能上传不能下载、删除权限配置的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。