473,721 Members | 2,259 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

permissions policy checker

i'm looking for best methods to add to a C# program i want to build to do
checking on permissions for files/folders and what rights in local pc policy.

if i have a give user id i want to traverse the Windows rights/permission
for that account. then see what rights under the local machine policy are
enabled for the user.

i'm working on finding issues where certain user accounts though they appear
correct do not seem to have specific access. where another account with
similar configuration works.

so the program will go through Windows rights and permissions in hopes of
finding discrepancies with rights.

what i'm looking for is what .Net Framework reference are needed, what
windows api (wmi...) and i guess assistance in getting started.

thanks.
so the program will go through Windows rights and permissions in hopes of
finding discrepencies with rights.
Oct 10 '07 #1
5 1816
i'm looking for best methods to add to a C# program i want to build to do
checking on permissions for files/folders and what rights in local pc
policy.

if i have a give user id i want to traverse the Windows rights/permission
for that account. then see what rights under the local machine policy are
enabled for the user.

i'm working on finding issues where certain user accounts though they
appear
correct do not seem to have specific access. where another account with
similar configuration works.

so the program will go through Windows rights and permissions in hopes of
finding discrepancies with rights.

what i'm looking for is what .Net Framework reference are needed, what
windows api (wmi...) and i guess assistance in getting started.

thanks.
so the program will go through Windows rights and permissions in hopes of
finding discrepencies with rights.
I'm not sure what .NET offers in this area nor am I completely clear on your
own needs. It takes a solid amount of security knowledge to wade into this
area but perhaps this is what you're after:

http://msdn2.microsoft.com/en-us/library/aa374815.aspx
Oct 10 '07 #2
thanks Larry for your input.
is appears to be a piece of the pie.

in C# i want to build a program which will present me the equivalent of the
Windows permissions dialog which shows the detail permissions of the
folder/file.

I need to build a permissions/rights checker and i’m not finding data in one
place explaining what is needed. So i can not start.
"Larry Smith" wrote:
i'm looking for best methods to add to a C# program i want to build to do
checking on permissions for files/folders and what rights in local pc
policy.

if i have a give user id i want to traverse the Windows rights/permission
for that account. then see what rights under the local machine policy are
enabled for the user.

i'm working on finding issues where certain user accounts though they
appear
correct do not seem to have specific access. where another account with
similar configuration works.

so the program will go through Windows rights and permissions in hopes of
finding discrepancies with rights.

what i'm looking for is what .Net Framework reference are needed, what
windows api (wmi...) and i guess assistance in getting started.

thanks.
so the program will go through Windows rights and permissions in hopes of
finding discrepencies with rights.

I'm not sure what .NET offers in this area nor am I completely clear on your
own needs. It takes a solid amount of security knowledge to wade into this
area but perhaps this is what you're after:

http://msdn2.microsoft.com/en-us/library/aa374815.aspx
Oct 22 '07 #3
thanks Larry for your input.
is appears to be a piece of the pie.

in C# i want to build a program which will present me the equivalent of
the
Windows permissions dialog which shows the detail permissions of the
folder/file.

I need to build a permissions/rights checker and i'm not finding data in
one
place explaining what is needed. So i can not start.
If you're simply trying to reproduce the security property page seen when
you look at a file's properties in Windows Explorer then check out
"CreateSecurity Page()" and "EditSecurity() " in the WinAPI. It appears this
is what you're after though I've never had the need to use it myself. Keep
in mind that native Windows security is different than .NET security but it
appears you're after the former. Of course you'll have to P/Invoke to these
functions if you want to do it in C# assuming there's no simpler way to do
it in.NET (I doubt it but look first). Note that this is a deep subject in
any case so I'd recommend some heavy reading before you proceed.
"Programmin g Windows Security" by Keith Brown is a great book to start with.
It's getting old now so it may be hard to find (I'm not sure) but it's still
very relevant (explaining Windows security in excellent detail). At the very
least cross-reference your Google searches with his name. Good luck.
Oct 22 '07 #4
thanks Larry,
will do.
i don't need the GUI since i need to check the fields. i was hoping for full
C# and .NET but it never that easy. thanks for the reference manual this is
what i really need.

"Larry Smith" wrote:
thanks Larry for your input.
is appears to be a piece of the pie.

in C# i want to build a program which will present me the equivalent of
the
Windows permissions dialog which shows the detail permissions of the
folder/file.

I need to build a permissions/rights checker and i'm not finding data in
one
place explaining what is needed. So i can not start.

If you're simply trying to reproduce the security property page seen when
you look at a file's properties in Windows Explorer then check out
"CreateSecurity Page()" and "EditSecurity() " in the WinAPI. It appears this
is what you're after though I've never had the need to use it myself. Keep
in mind that native Windows security is different than .NET security but it
appears you're after the former. Of course you'll have to P/Invoke to these
functions if you want to do it in C# assuming there's no simpler way to do
it in.NET (I doubt it but look first). Note that this is a deep subject in
any case so I'd recommend some heavy reading before you proceed.
"Programmin g Windows Security" by Keith Brown is a great book to start with.
It's getting old now so it may be hard to find (I'm not sure) but it's still
very relevant (explaining Windows security in excellent detail). At the very
least cross-reference your Google searches with his name. Good luck.
Oct 22 '07 #5
Larry i thought i share this, Keith has a new book.
"The .NET Developer's Guide to Windows Security"

"auldh" wrote:
thanks Larry,
will do.
i don't need the GUI since i need to check the fields. i was hoping for full
C# and .NET but it never that easy. thanks for the reference manual this is
what i really need.

"Larry Smith" wrote:
thanks Larry for your input.
is appears to be a piece of the pie.
>
in C# i want to build a program which will present me the equivalent of
the
Windows permissions dialog which shows the detail permissions of the
folder/file.
>
I need to build a permissions/rights checker and i'm not finding data in
one
place explaining what is needed. So i can not start.
If you're simply trying to reproduce the security property page seen when
you look at a file's properties in Windows Explorer then check out
"CreateSecurity Page()" and "EditSecurity() " in the WinAPI. It appears this
is what you're after though I've never had the need to use it myself. Keep
in mind that native Windows security is different than .NET security but it
appears you're after the former. Of course you'll have to P/Invoke to these
functions if you want to do it in C# assuming there's no simpler way to do
it in.NET (I doubt it but look first). Note that this is a deep subject in
any case so I'd recommend some heavy reading before you proceed.
"Programmin g Windows Security" by Keith Brown is a great book to start with.
It's getting old now so it may be hard to find (I'm not sure) but it's still
very relevant (explaining Windows security in excellent detail). At the very
least cross-reference your Google searches with his name. Good luck.

Oct 22 '07 #6

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

Similar topics

1
1535
by: Rick | last post by:
Hi, A while ago someone helped with me by providing code to connect with another url. The problem is, that won't work for a applet because of some permissions. There's that policy tool so I used it for the first time. I have some problems however, first of all, do I need to 'install' that file for every computer that's going to use these policies? And then, what to do with the permissions? I've added "SocketPermission -> Connect" Now...
12
2598
by: Angelos Karantzalis | last post by:
Is there a way to set Permissions based on user roles by using some configuration file for my application ? I'm coming from a Java background, where that could very easily be accomplished but although I've searched around MSDN I can't find a clear answer to this ... Thanks a lot guys, Angel
3
2296
by: JA | last post by:
Hi, Does anyone know of an asp script, online somewhere, that I can use to find out the permissions of a folder? My ISP says these folders have full permissions, but my programs say "permission denied". I don't know if it is the programming, or if the folder don't really have the right permissions. Thanks! JA
12
1970
by: Mark | last post by:
Hello, in a simple console application I try to create a file with some code like: FileStream file = new FileStream("test.txt", FileMode.OpenOrCreate, FileAccess.Write); StreamWriter sw = new StreamWriter(file); sw.Write("Hello"); sw.Close(); file.Close();
13
2192
by: John Bowman | last post by:
Hi All, I've got a simple wrapper static test method on a class to expand the environment variables on a specified string: public static string ExpandEnvironmentStr(string Str) { return Environment.ExpandEnvironmentVariables(Str); }
1
2677
by: jmurphy95 | last post by:
Hi there, I have a Windows application that I'm running from a shared drive that needs to access file/directory resources on other drives. I've done a lot of reading, but a lot of the material out there relates to the 1.1 Framework as opposed to 2.0. I've added the following lines to my AssemblyInfo.vb: <Assembly: System.Security.AllowPartiallyTrustedCallers()> <Assembly: System.Security.SecurityTreatAsSafe()>
8
7705
by: jporter188 | last post by:
Hello, I am working on a project to manipulate XML files. All of the files, the code, and the output are on network drives. When I run my program I get an exception (see below). I tried giving the LocalIntranet_Zone full permissions in the .NET Framework 2.0 Configuration msc. This had no effect whatsoever. What do I need to do to fix this? Thanks,
3
5639
by: Nathan Sokalski | last post by:
When I attempt to access a Microsoft Access database from my website, I recieve the following error: Server Error in '/' Application. -------------------------------------------------------------------------------- Security Exception Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the...
4
8276
by: Spam Catcher | last post by:
Hello All, I need to integrate my application into Active Directory. My application has the concept of groups, users, and also individual permissions. Users can be part of a group such as administrators, but explicit permissions may also be set. Can active directory handle this too? For example: Administrators can typically add/remove/edit/delete an item,
0
8840
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9367
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9215
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9131
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6669
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4753
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3189
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 we have to send another system
2
2576
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2130
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.