配置proftpd限制上传文件大小

软件FTP的用户中转文件目录,本只准备给用户做临时的文档中转和保存,没想到却经常被学生传上游戏及电影一类的大文件,使有限的空间很快被占满,故需要对上传文件的大小做限制,在proftpd的主页上找到MaxStoreFileSize 命令,可限制相关目录设置中用户上传文件的大小 MaxStoreFileSize Name MaxStoreFileSize -- Restrict size of uploaded files Synopsis MaxStoreFileSize [ number|"*" units ["user"|"group"|"class" expression]] Default None Context server config, , , , , .ftpaccess Module mod_xfer Compatibility 1.2.7rc1 and later Description When uploading files from a client (eg serving a STOR request), the server will check for any configured limit against the size of the file being sent, and abort any transfers if/when the given file's size exceeds the configured limit. A single "*" argument configures unlimited file sizes, and is used primarily to override any inherited restrictions from higher contexts. The given number is the number of bytes for the limit, and is followed by a units specifier of (case-insensitive) "Gb" (Gigabytes), "Mb" (Megabytes), "Kb" (Kilobytes), or "B" (bytes). The given number of bytes is multiplied by the appropriate factor. The optional parameters are used to restrict the file size limits only to specific users. If the "user" restriction is given, then expression is a user-expression specifying to which users the rule applies. Similarly for the "group" restriction. For the "class" restriction, the expression is simply the name of connection class for whom the rule will apply. If no matching user, group, or class expression is found for the current user (in that order), then a limit with no expression (ie no "user", "group", or "class" identifier) is applied. See Also: MaxRetrieveFileSize See also Examples # Restrict upload to only 3 megabytes MaxStoreFileSize 3 Mb # Restrict anonymous uploads to 50k, but allow unlimited upload size for # everyone else MaxStoreFileSize 50 Kb user anonymous MaxStoreFileSize *
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值