<?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 Re: Remove Everyone/Full from new share in Python REST API in ONTAP Rest API Discussions</title>
    <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/Remove-Everyone-Full-from-new-share-in-Python-REST-API/m-p/435706#M321</link>
    <description>&lt;P&gt;Unfortunately support is sorry to tell me that this situation is out of their scope.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I expect that adding Everyone/Full is the default, and unavoidable.&amp;nbsp; The issue is, it will take some time for me to figure out how to remove it, testing, playing around.&amp;nbsp; I see no examples in the Github scripts Netapp provides as samples.&amp;nbsp; They only create one share in the cifssetup.py script, and they don't set ACLs on it, leaving Everyone/Full.&amp;nbsp; So need to figure out how to delete Everyone/Full, as you can imagine, adding Everyone/Full with no_access does not achieve the goal &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&amp;nbsp; Will post back if/when I figure it out.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 07 Jun 2022 19:21:59 GMT</pubDate>
    <dc:creator>Cjones</dc:creator>
    <dc:date>2022-06-07T19:21:59Z</dc:date>
    <item>
      <title>Remove Everyone/Full from new share in Python REST API</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/Remove-Everyone-Full-from-new-share-in-Python-REST-API/m-p/435562#M314</link>
      <description>&lt;P&gt;This code works, but also leaves Everyone/Full on the new share.&amp;nbsp; Is there a way to remove it during creation, or is that a follow up step?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;share_info = {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"path"&lt;/SPAN&gt;&lt;SPAN&gt;: thepath,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"svm"&lt;/SPAN&gt;&lt;SPAN&gt;: {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"name"&lt;/SPAN&gt;&lt;SPAN&gt;: svm_name&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; },&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"name"&lt;/SPAN&gt;&lt;SPAN&gt;: user,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;"acls"&lt;/SPAN&gt;&lt;SPAN&gt;: [&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/SPAN&gt;&lt;SPAN&gt;"permission"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"full_control"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"type"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"windows"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"user_or_group"&lt;/SPAN&gt;&lt;SPAN&gt;: fulladgroup},&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/SPAN&gt;&lt;SPAN&gt;"permission"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"change"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"type"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"windows"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"user_or_group"&lt;/SPAN&gt;&lt;SPAN&gt;: rwadgroup},&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {&lt;/SPAN&gt;&lt;SPAN&gt;"permission"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"read"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"type"&lt;/SPAN&gt;&lt;SPAN&gt;: &lt;/SPAN&gt;&lt;SPAN&gt;"windows"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;"user_or_group"&lt;/SPAN&gt;&lt;SPAN&gt;: roadgroup}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; }&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; myShare = CifsShare.from_dict(share_info)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;try&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; myShare.post(poll=&lt;/SPAN&gt;&lt;SPAN&gt;True&lt;/SPAN&gt;&lt;SPAN&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; print(&lt;/SPAN&gt;&lt;SPAN&gt;"cifsshare %s created Successfully"&lt;/SPAN&gt;&lt;SPAN&gt; % myShare.name)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 04 Jun 2025 09:59:57 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/Remove-Everyone-Full-from-new-share-in-Python-REST-API/m-p/435562#M314</guid>
      <dc:creator>Cjones</dc:creator>
      <dc:date>2025-06-04T09:59:57Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Everyone/Full from new share in Python REST API</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/Remove-Everyone-Full-from-new-share-in-Python-REST-API/m-p/435638#M318</link>
      <description>&lt;P&gt;I'm not very familiar with the CIFS shares feature specifically, but the &lt;A href="https://library.netapp.com/ecmdocs/ECMLP2882307/html/index.html" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt; says that passing acls (as you already are) should prevent the default Everyone/Full-Control from being used:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the DOC /protocols/cifs/shares section:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;&lt;SPAN&gt;Permissions can be assigned to this newly created share by specifying the 'acls' field. When a CIFS share is created, ONTAP creates a default ACL for this share with 'Full-Control' permissions for an 'Everyone' user.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If that's not how it's behaving for you, then I think opening a ticket with your request and result would be the next step. Perhaps there's some bug in the API.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2022 15:36:07 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/Remove-Everyone-Full-from-new-share-in-Python-REST-API/m-p/435638#M318</guid>
      <dc:creator>RobertBlackhart</dc:creator>
      <dc:date>2022-06-06T15:36:07Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Everyone/Full from new share in Python REST API</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/Remove-Everyone-Full-from-new-share-in-Python-REST-API/m-p/435699#M319</link>
      <description>&lt;P&gt;Thanks for your reply, the API is perhaps not behaving appropriately.&amp;nbsp; Despite specifying ACLs during creation, Everyone/Full is still added to the share on creation.&amp;nbsp; I will open a case and see what they say, report back.&amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2022 16:52:24 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/Remove-Everyone-Full-from-new-share-in-Python-REST-API/m-p/435699#M319</guid>
      <dc:creator>Cjones</dc:creator>
      <dc:date>2022-06-07T16:52:24Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Everyone/Full from new share in Python REST API</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/Remove-Everyone-Full-from-new-share-in-Python-REST-API/m-p/435700#M320</link>
      <description>&lt;P&gt;Rereading the documentation blurb that I posted, one might also interpret it to mean that ONTAP will always create the default 'Everyone' user when a CIFS share is created. It would be interesting to see if support comes back with that being intended and if there would be a way to prevent that on initial creation.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2022 17:14:05 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/Remove-Everyone-Full-from-new-share-in-Python-REST-API/m-p/435700#M320</guid>
      <dc:creator>RobertBlackhart</dc:creator>
      <dc:date>2022-06-07T17:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Everyone/Full from new share in Python REST API</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/Remove-Everyone-Full-from-new-share-in-Python-REST-API/m-p/435706#M321</link>
      <description>&lt;P&gt;Unfortunately support is sorry to tell me that this situation is out of their scope.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I expect that adding Everyone/Full is the default, and unavoidable.&amp;nbsp; The issue is, it will take some time for me to figure out how to remove it, testing, playing around.&amp;nbsp; I see no examples in the Github scripts Netapp provides as samples.&amp;nbsp; They only create one share in the cifssetup.py script, and they don't set ACLs on it, leaving Everyone/Full.&amp;nbsp; So need to figure out how to delete Everyone/Full, as you can imagine, adding Everyone/Full with no_access does not achieve the goal &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&amp;nbsp; Will post back if/when I figure it out.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2022 19:21:59 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/Remove-Everyone-Full-from-new-share-in-Python-REST-API/m-p/435706#M321</guid>
      <dc:creator>Cjones</dc:creator>
      <dc:date>2022-06-07T19:21:59Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Everyone/Full from new share in Python REST API</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/Remove-Everyone-Full-from-new-share-in-Python-REST-API/m-p/435708#M322</link>
      <description>&lt;P&gt;Sorry, that part I can help with. I thought maybe you knew that part and just wanted to find a one step solution instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To remove an ACL, you would want to call DELETE on /api/protocols/cifs/shares/{svm.uuid}/{share}/acls/{user_or_group}/{type} where {user_or_group} should be Everyone and {type} should be full_control. So to add to your code from the first post, I think it might look like this (untested, but you can modify for your needs):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;share_info = {
    "path": thepath,
    "svm": {
        "name": svm_name
    },
    "name": user,
    "acls": [
        {"permission": "full_control", "type": "windows", "user_or_group": fulladgroup},
        {"permission": "change", "type": "windows", "user_or_group": rwadgroup},
        {"permission": "read", "type": "windows", "user_or_group": roadgroup}
    ]
}
myShare = CifsShare.from_dict(share_info)
myShare.post(hydrate=True)

everyone_acl = CifsShareAcl.find(myShare.svm.uuid, myShare.name, user_or_group="Everyone")
if everyone_acl is not None:
    everyone_acl.delete()

print("cifsshare %s created Successfully" % myShare.name)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 07 Jun 2022 19:56:15 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/Remove-Everyone-Full-from-new-share-in-Python-REST-API/m-p/435708#M322</guid>
      <dc:creator>RobertBlackhart</dc:creator>
      <dc:date>2022-06-07T19:56:15Z</dc:date>
    </item>
    <item>
      <title>Re: Remove Everyone/Full from new share in Python REST API</title>
      <link>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/Remove-Everyone-Full-from-new-share-in-Python-REST-API/m-p/435709#M323</link>
      <description>&lt;P&gt;Tested, that works, thanks!&amp;nbsp; I was thinking ideally it would be nice to create it as needed to begin with, but the code to remove it does the job as well.&amp;nbsp; Much appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2022 20:04:05 GMT</pubDate>
      <guid>https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/Remove-Everyone-Full-from-new-share-in-Python-REST-API/m-p/435709#M323</guid>
      <dc:creator>Cjones</dc:creator>
      <dc:date>2022-06-07T20:04:05Z</dc:date>
    </item>
  </channel>
</rss>

