NetApp Community Update
This site will enter Read Only mode on July 23 as we prepare to move to a new platform. You will still be able to view content, but posting and replying will be temporarily disabled.
We're excited to launch our new Community experience on July 30 and more information will follow soon.
Stay connected during the transition - Join our Discord community today.

ONTAP Discussions

How to create fploicy to limite only txt file?

AllenChang
1,713 Views

I create a fpolicy to limited a volume can be store .txt file

I use this command

First I create a event

filer>vserver fpolicy policy event create -vserver fpsvm1 -event-name event1 -file-operations create,write,rename -protocol cifs

 

Than I create a policy

filer>vserver fpolicy policy create -vserver fpsvm1 -policy-name policy1 -events event1 -engine native -is-mandatory true -allow-privileged-access no -is-passthrough-read-enabled false

 

And I create a scope

filer>vserver fpolicy policy scope create -vserver fpsvm1 -policy-name policy1 -file-extensions-to-exclude txt -volumes-to-include vol1

 

finially I enable the policy

filer>vserver fpolicy enable -vserver fpsvm1 -policy-name policy1 -sequence-number 1

 

but I found the volume still can store any file

 

How must I modify configuration?

1 ACCEPTED SOLUTION

ChLokesh
1,645 Views

Hello, 

 

While creating the scope, we had used the option -file-extensions-to-exclude.
This parameter specifies list of file extensions for which FPolicy processing will be excluded.


Please modify the  scope and use option -file-extensions-to-include txt in place of  -file-extensions-to-exclude to make Fpolicy process this file extension. 


Here is the matching KB for your reference: https://kb.netapp.com/on-prem/ontap/da/NAS/NAS-KBs/How_to_configure_native_Fpolicy_in_ONTAP_to_block_extensions 

Please do let me know if it fixed the issue for you.

 

Cheers! 

View solution in original post

1 REPLY 1

ChLokesh
1,646 Views

Hello, 

 

While creating the scope, we had used the option -file-extensions-to-exclude.
This parameter specifies list of file extensions for which FPolicy processing will be excluded.


Please modify the  scope and use option -file-extensions-to-include txt in place of  -file-extensions-to-exclude to make Fpolicy process this file extension. 


Here is the matching KB for your reference: https://kb.netapp.com/on-prem/ontap/da/NAS/NAS-KBs/How_to_configure_native_Fpolicy_in_ONTAP_to_block_extensions 

Please do let me know if it fixed the issue for you.

 

Cheers! 

Public