473,382 Members | 1,078 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Security info of desktop folder

Hi,

If I get the ACL of a desktop folder, I do not get the right security
settings.

(Directory is the folder on the desktop)

DirectoryInfo^ dir = fileInfo->Directory;
FileSecurity^ fileSecurity = fileInfo->GetAccessControl();
AuthorizationRuleCollection^ acl = nullptr;
acl = fileSecurity->GetAccessRules( true, true,
SecurityIdentifier::typeid );
for (int i = 0; i < acl->Count; i++) {
FileSystemAccessRule^ rule = dynamic_cast<FileSystemAccessRule^>(
acl[i] );
if ( AccessControlType::Allow.Equals( rule->AccessControlType ) )
{
bool bReadAllowed = ( ( (int)rule->FileSystemRights &
(int)FileSystemRights::Read ) == (int)FileSystemRights::Read );
// bReadAllowd becomes FALSE, while this is TRUE when checking
the security in the explorer
}
}
Does anyone know what I am doing wrong here ?
Thanks in advance, martin.
Apr 17 '07 #1
0 935

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

Similar topics

2
by: Scott F. Brown | last post by:
Hello all, I am attempting to work on a project for work at home and I'm experiencing extremely slow page loads. These are pages that work fine in the office but when I try to work on the...
9
by: Jeff Gaines | last post by:
I have just installed VS 2005 (MSDN version) and I am having problems coping files to the Projects folder while VS2005 is running. The projects folder is on a network share and I have used...
19
by: Blair P. Houghton | last post by:
I'm just learning Python, so bear with. I was messing around with the webbrowser module and decided it was pretty cool to have the browser open a URL from within a python script, so I wrote a...
3
by: steveeisen | last post by:
microsoft.public.dotnet.languages.vb.upgrade isn't getting much traffic, so I'll try here. Ours is a VB6 shop exploring .NET. First I wrote a new application with VB .NET 2003 to create a...
0
by: Martin jensson | last post by:
Hi, If I get the ACL of a desktop folder, I do not get the right security settings. (Directory is the folder on the desktop) DirectoryInfo^ dir = DirInfo->Directory; DirectorySecurity^...
1
by: Edmund | last post by:
I hope someone can help me out set up the security properly. I have Microsoft Access 97 and Access 2000 in my computer and I developed my database with Access 2000 with the updated patch...
3
by: sanghavi | last post by:
how to create a set up project in vb.net..how to run an application on a different machine
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.