Deleting a user from Folder permission List

  • Thread starter Thread starter gellert
  • Start date Start date
G

gellert

Hello,

I created a Folder using
Directory.CreateDirectory("myfolder");

and like to remove the User "Everyone" from the Permission list. I
could not manage to do this.
It is no Problem to set new ACL Permissions (DirectorySecurity and
AccessControl) and change the Permission from "Everyone" but I could
not delete "Everyone" from the Permission list.

Do U have an idea?

Thanks.
G.
 
G.,

You should get the IdentityReference instance which represents the
Everyone group, and then pass that to the PurgeAccessRules method on the
DirectorySecurity instance that you retrieved for the directory.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top