Network Storage Protocols Discussions

Remove all SHARES permissions


Hi all,

I am new to NetApp world and having basic scripting skills.

Here is the details :

Domain name : (fake name)

Users naming model :,

Server name : SRVBKP

Shares names : \\SRVBKP\firstname_secondname





The current situation is a bit confusing, I read the documentation about cifs access share [-g] user rights and cifs access -delete share [-g] user, but as it’s a production server, this why I need your assistance to create a script that:

  • Remove all the permissions (whatever they are, Read,Modify or Full control) on all USERS SHARES. Remove any users, any groups from SHARE permissions
  • Grant full control to each user to his own folder (personnal share)
  • This is optionnal, I want to do the same as #1 but for NTFS permissions

Any help is most welcome,

Many Thanks for your help




You can probably accomplish most of your objectives using home directories.  Your cli implies 7mode, so have a look at the 824 version:


If you need to script beyond that, there are plenty of options depending on your preferred scripting environment.  


If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.


Many thanks for your reply,


I didn't mention that the shares are already created and the permissions are set.

This is why I need to reset permissions first, than grant the appropriate right to users accordingly to their folders.



If this post resolved your issue, help others by selecting ACCEPT AS SOLUTION or adding a KUDO.
Cannot find the answer you need? No need to open a support case - just CHAT and we’ll handle it for you.
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