<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic NTFS security: How to handle internal security objects? in Network and Storage Protocols</title>
    <link>https://community.netapp.com/t5/Network-and-Storage-Protocols/NTFS-security-How-to-handle-internal-security-objects/m-p/152681#M9332</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm using the C# ONTAP API 9.5P3 to create directories and assign NTFS security DACLs to them. In this process a security policy, a security policy task and a security descriptor are being created. When deleting the created directory, these objects remain and never get deleted by the server.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How should I deal with these objects? Ignore them? Delete them immediately or on directory deletion (which might be done by a user over CIFS)? What if permissions need to change?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Code I used for testing:&lt;/P&gt;
&lt;PRE&gt;// create security policy
string policyName = "my-policy";
new FileDirectorySecurityPolicyCreate {PolicyName = policyName}.Invoke(filer);

// create directory and apply NTFS DACLs
string uuid = BuildUniqueIdentifier();
string securityDescriptorName = $"sd-{uuid}";

new FileCreateDirectory {Perm = "0777", Path = "/vol/Test_CIFS_volume/test-folder"}.Invoke(filer);

new FileDirectorySecurityNtfsCreate{Owner = "John Doe", NtfsSd = securityDescriptorName}.Invoke(filer);

new FileDirectorySecurityNtfsDaclAdd
{
	NtfsSd = securityDescriptorName,
	Account = "Unauthorized Person",
	AccessType = "deny",
	ApplyTo = new[] {"this-folder"}
}.Invoke(filer);

new FileDirectorySecurityPolicyTaskAdd
{
	PolicyName = policyName,
	NtfsSd = new[] {securityDescriptorName},
	Path = "/Test_CIFS_volume/test-folder"
}.Invoke(filer);

new FileDirectorySecuritySet {PolicyName = policyName}.Invoke(filer);

// delete the created directory
new FileDeleteDirectory {Path = "/vol/Test_CIFS_volume/test-folder"}.Invoke(filer);

// output existing security objects (implementation omitted for readability) 
GetVersion(filer);
ListSecurityDescriptors(filer);
ListPolicies(filer);
ListPolicyTasks(filer, policyName);&lt;/PRE&gt;
&lt;P&gt;Output:&lt;/P&gt;
&lt;PRE&gt;API Version: NetApp Release 9.5P3: Tue Apr 16 22:44:27 UTC 2019
Security Descriptors:
 - sd-1575281495-f39a5bf0-244b-45ac-866b-49b83f6ef0b9 [Owner: John Doe]
Policies:
 - my-policy
Tasks for policy my-policy:
 - ntfs [Path: /Test_CIFS_volume/test-folder]
&lt;/PRE&gt;</description>
    <pubDate>Wed, 04 Jun 2025 12:07:20 GMT</pubDate>
    <dc:creator>MrFrogger</dc:creator>
    <dc:date>2025-06-04T12:07:20Z</dc:date>
    <item>
      <title>NTFS security: How to handle internal security objects?</title>
      <link>https://community.netapp.com/t5/Network-and-Storage-Protocols/NTFS-security-How-to-handle-internal-security-objects/m-p/152681#M9332</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm using the C# ONTAP API 9.5P3 to create directories and assign NTFS security DACLs to them. In this process a security policy, a security policy task and a security descriptor are being created. When deleting the created directory, these objects remain and never get deleted by the server.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How should I deal with these objects? Ignore them? Delete them immediately or on directory deletion (which might be done by a user over CIFS)? What if permissions need to change?&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Code I used for testing:&lt;/P&gt;
&lt;PRE&gt;// create security policy
string policyName = "my-policy";
new FileDirectorySecurityPolicyCreate {PolicyName = policyName}.Invoke(filer);

// create directory and apply NTFS DACLs
string uuid = BuildUniqueIdentifier();
string securityDescriptorName = $"sd-{uuid}";

new FileCreateDirectory {Perm = "0777", Path = "/vol/Test_CIFS_volume/test-folder"}.Invoke(filer);

new FileDirectorySecurityNtfsCreate{Owner = "John Doe", NtfsSd = securityDescriptorName}.Invoke(filer);

new FileDirectorySecurityNtfsDaclAdd
{
	NtfsSd = securityDescriptorName,
	Account = "Unauthorized Person",
	AccessType = "deny",
	ApplyTo = new[] {"this-folder"}
}.Invoke(filer);

new FileDirectorySecurityPolicyTaskAdd
{
	PolicyName = policyName,
	NtfsSd = new[] {securityDescriptorName},
	Path = "/Test_CIFS_volume/test-folder"
}.Invoke(filer);

new FileDirectorySecuritySet {PolicyName = policyName}.Invoke(filer);

// delete the created directory
new FileDeleteDirectory {Path = "/vol/Test_CIFS_volume/test-folder"}.Invoke(filer);

// output existing security objects (implementation omitted for readability) 
GetVersion(filer);
ListSecurityDescriptors(filer);
ListPolicies(filer);
ListPolicyTasks(filer, policyName);&lt;/PRE&gt;
&lt;P&gt;Output:&lt;/P&gt;
&lt;PRE&gt;API Version: NetApp Release 9.5P3: Tue Apr 16 22:44:27 UTC 2019
Security Descriptors:
 - sd-1575281495-f39a5bf0-244b-45ac-866b-49b83f6ef0b9 [Owner: John Doe]
Policies:
 - my-policy
Tasks for policy my-policy:
 - ntfs [Path: /Test_CIFS_volume/test-folder]
&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Jun 2025 12:07:20 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Network-and-Storage-Protocols/NTFS-security-How-to-handle-internal-security-objects/m-p/152681#M9332</guid>
      <dc:creator>MrFrogger</dc:creator>
      <dc:date>2025-06-04T12:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: NTFS security: How to handle internal security objects?</title>
      <link>https://community.netapp.com/t5/Network-and-Storage-Protocols/NTFS-security-How-to-handle-internal-security-objects/m-p/152873#M9336</link>
      <description>&lt;P&gt;I got my question answered by support: A developer utilizing these API calls has full responsibility over the generated entities. They never get deleted by the NetApp-Server. If a user deletes the related file system objects, the entities are not getting deleted either. The recommendation is to keep the system clean and delete them as soon as possible.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2019 08:52:33 GMT</pubDate>
      <guid>https://community.netapp.com/t5/Network-and-Storage-Protocols/NTFS-security-How-to-handle-internal-security-objects/m-p/152873#M9336</guid>
      <dc:creator>MrFrogger</dc:creator>
      <dc:date>2019-12-09T08:52:33Z</dc:date>
    </item>
  </channel>
</rss>

