Skip to main content
NetApp Knowledge Base

How does ONTAP Native FPolicy determine a file extension

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

Applies to

  • ONTAP 9
  • Native FPolicy
  • SMB/CIFS Protocol

Answer

Question

  • How does ONTAP Native FPolicy determine the file extension when a file name contains one or more periods (.)?
  • For example, what extensions are used for FPolicy matching for the following file names?

Answer

  • Native FPolicy performs file screening based on the file extension rather than the file contents.
  • A period (.) is not included in the extension configured in the FPolicy extension list.

Example1:

File name: sample.txt

Extension: txt

Example2:

File name: sample.tar.gz

Extension: gz

  • When a file name contains multiple periods, such as sample.tar.gz, Native FPolicy matches the portion after the last period as the extension.
  • Therefore the extension of file sample.tar.gz is gz but not tar.gz.
  • The . itself is not part of the extension configured for FPolicy matching.
  • For files that do not have an extension, monitoring can be controlled by the following FPolicy scope option:

The following behavior was verified in testing:

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

This file name does not have a file extension.

FPolicy provides the following scope option to control whether objects without an extension are monitored:

  • sample.

Testing from a Windows SMB client confirmed that Windows did not allow a file name ending with a period (.) to be created.

Therefore, Native FPolicy extension matching for sample. could not be evaluated through the tested Windows SMB client.

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

カタカナ漢字 and _→⇒㈵ could be configured as an extension and that the corresponding file operation was successfully blocked by Native FPolicy.

Note: This confirms the behavior for the tested character only. It does not establish that every Unicode, multibyte, special, or environment-dependent character is supported as an FPolicy extension.

Additional Information

  • When an extension containing a period was configured, ONTAP returns the following error:

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.