Add AD group to have modify permission on folder

Hi there,

Is there any way to add active directory group to folder and give modify permission to this new group?

right click to folder → properties → security → edit → add → new user group and allow modify modify



3

@Zehra

Please try this

Dim FolderInfo As IO.DirectoryInfo = New IO.DirectoryInfo(FolderPath)
Dim FolderAcl As System.Security.AccessControl.DirectorySecurity = FolderInfo.GetAccessControl()
FolderAcl.AddAccessRule(New System.Security.AccessControl.FileSystemAccessRule(UserAccount, System.Security.AccessControl.FileSystemRights.Modify, System.Security.AccessControl.InheritanceFlags.ContainerInherit Or System.Security.AccessControl.InheritanceFlags.ObjectInherit, System.Security.AccessControl.PropagationFlags.None, System.Security.AccessControl.AccessControlType.Allow))
FolderInfo.SetAccessControl(FolderAcl)

Useraccount - As Appears in the access window when search Eg: Laptopxyz\abc

cheers

1 Like

Thank you very much, perfect solution.

1 Like

If you have time, could you please check also this:

@Zehra

I see the solution is already there…So should be good

cheers

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.