473,487 Members | 2,452 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

DirectorySecurity

In trying to view the ACL of a directory some (not all) domain groups are not
having their identities translated.
If I use FileSecurity to list out the groups with access to a particular
file in the same directory, all group identities are translatable (even the
ones that are untranslatable with the DirectorySecurity object).
Any ideas on why the IdentityReference will not translate from a
DirectorySecurity AccessRule will not translate, but an IdentityReference
from a FileSecurity AccessRule is ok?
Code :
Dim DirSec As System.Security.AccessControl.DirectorySecurity =
System.IO.Directory.GetAccessControl(Me.txtFolder. Text)
For Each rule As FileSystemAccessRule In DirSec.GetAccessRules(True,
True, GetType(NTAccount))
Console.WriteLine("Identity : " &
rule.IdentityReference.ToString())
Next
For some groups the IdentityReference is simply a SID, for others, the
IdentityReference is the domain group name.
Looking at the Security tab of the folder's properties dialog shows all
domain group names.

Thanks
MATT
Jan 30 '06 #1
0 1327

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3054
by: Jason Steeves | last post by:
I am using the following code to get the properties of a folder and everything is working ok but I need to find the "Current owner of this item" for the specified folder. Dim fileprops As...
0
938
by: Marcus Dano | last post by:
Hi, I want to read all ACLs from a single folder in my NTFS partition. I'am using following code: Dim dir As DirectoryInfo = New DirectoryInfo("C:\demo") Dim sec As DirectorySecurity =...
7
9180
by: Nick | last post by:
Hello, I'm trying to add a DirectorySecurity ACL entry to an existing directory (based on some code I found in the msdn). However, this code only works on local machines because I can't...
4
14732
by: DavidMGorman | last post by:
Apologies if this has been asked & answered (pls post a link if this is so) but I am tired of finding a close but not quite close enough solution. I am looking for a sample or explanation of how to...
1
9898
by: Aek | last post by:
What is the best way to recursively change the permissions of the directory we are installing into? Is there a nice way to do this in C# ..NET? We are using an MSI installer and will need to add...
0
1371
by: Edhy Rijo [Progytech] | last post by:
Hi All, I am very new to VB.NET and creating small project to that will copy all files from a DVD to a folder in the Hard Drive. While doing the copy around 30% I got the following error: ...
10
7956
by: DragonLord | last post by:
I am creating a folder from my application and attempting to write from the filestream to the folder, however when I do I get an access denied exception. I have tried adding security rights to the...
4
4053
by: kanepart2 | last post by:
Hey , I need to make a function in C# that gets the permissions on a folder and its sub folders. I wanted to list the users and the permissions they have been granted on folders. I dont know if it...
0
1162
by: theindescribablehunk | last post by:
Hi, I previously used DirectoryInfo objects to access the DirectorySecurity object so i could enumerate the ACL for specific directories. Unfortunately the DirectoryInfo object doesn't support...
0
7106
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6967
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7181
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6846
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7349
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5442
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1381
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
267
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.