跳转到主内容

ONTAP Native FPolicy 如何确定文件扩展名

Views:
Visibility:
Public
Votes:
0
Category:
ontap-9
Specialty:
nas
Last Updated:

适用于

  • ONTAP 9
  • 原生 FPolicy
  • SMB/CIFS 协议

回答

问题

  • 当文件名包含一个或多个句点(.)时,ONTAP Native FPolicy 如何确定文件扩展名?
  • 例如,以下文件名的 FPolicy 匹配使用了哪些扩展名?

回答

  • Native FPolicy 根据文件扩展名而不是文件内容执行文件筛选。
  • FPolicy 扩展名列表中配置的扩展名不包含句点(.)。

示例1:

文件名:sample.txt

扩展名: txt

Example2:

文件名: sample.tar.gz

扩展名:gz

  • 当文件名包含多个句点时,例如 sample.tar.gz,原生 FPolicy 会将最后一个句点之后的部分作为扩展名进行匹配。
  • 因此,文件 sample.tar.gz 的扩展名为 gz,而不是 tar.gz。
  • . 本身不属于为 FPolicy 匹配配置的扩展名。
  • 对于没有扩展名的文件,可以通过以下 FPolicy 范围选项来控制监控:

在测试中验证了以下行为:

  • sample.txt -> txt
  • sample.tar.gz-> gz
  • sample 

此文件名没有文件扩展名。

FPolicy 提供了以下范围选项来控制是否监视没有扩展名的对象:

  • sample.

来自 Windows SMB 客户端的测试确认,Windows 不允许创建以句点(.)结尾的文件名。

因此,无法通过测试的 Windows SMB 客户端评估针对 sample. 的原生 FPolicy 扩展匹配。

  • sample.カタカナ漢字 和 sample._→⇒㈵

カタカナ漢字 和 _→⇒㈵ 可以配置为扩展名,并且相应的文件操作已被 Native FPolicy 成功阻止。

注:这仅确认测试字符的行为。这并不能证明每个 Unicode、多字节、特殊或环境相关字符都支持作为 FPolicy 扩展。

追加信息

  • 当配置了包含句点的扩展名时,ONTAP 返回以下错误:

Error: "test,.test" is an invalid value for field "-file-extensions-to-include <file extension>"

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.