ONTAP Discussions

Native fPolicy file blocking with RegExp

BerndS

Hello,

 

I'm searching for a documentation and/or explanation, how to use RegExp in native fPolicy file blocking. My customer wants to block double file extentions (like <filename>.cad.11, <filename>.cad.08, ... )

 

 

 

One valid RegExp for this could be

 

\.cad.[0-9]+?$

which will find this pattern at the end of a filename.

 

With
 

vserver fpolicy policy scope create –vserver <vserver name> -policy-name <Policy Name> -file-extensions-to-include <RegExp>


I can set the file extensions to match (after doing all the other setup requiered) and it is written, that it is possible to use regexp here.
 
How do I add this to the command parameter -file-extensions-to-include? I tried some variations and they don't work (like putting "", '' around), but all ended up with an error 😞
 
I was not able to find any documentation on that topic, so if someone has found something which I can handoff to the customer?

2 REPLIES 2

dadan

Similar thing over here.

 

I want to native file block a extension with double extension like "filename.aaa.bbb" with folicy. I tried to masquerade the dot, but nothing helped (\.aaa\.bbb). * or ? seem to not match for dots (periods).

 

So how to block double file extensions? We´re using Clustered Data Ontap 8.3P2.

zacharyt

To include charachters such as "?" in the command you can use the command "set -active-policy false", then set it back to true after your done.

Announcements
NetApp on Discord Image

We're on Discord, are you?

Live Chat, Watch Parties, and More!

Explore Banner

Meet Explore, NetApp’s digital sales platform

Engage digitally throughout the sales process, from product discovery to configuration, and handle all your post-purchase needs.

NetApp Insights to Action
I2A Banner
Public