Re: How to find out access permissions for files?
From: Michael Giagnocavo [MVP] (mggUNSPAM_at_Atrevido.net)
Date: 07/24/03
- Next message: Michael Giagnocavo [MVP]: "Re: User and Group permissions on a folder"
- Previous message: Shel Blauman [MSFT]: "Re: Custom permissions not throwing exceptions"
- In reply to: Christoph Wienands: "How to find out access permissions for files?"
- Next in thread: Christoph Wienands: "Re: How to find out access permissions for files?"
- Reply: Christoph Wienands: "Re: How to find out access permissions for files?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 23 Jul 2003 17:19:34 -0600
On the CSharp page on gotdotnet.com they have a list of code
libraries. One of them is a library to work with ACLs. That should
be able to help you.
http://www.gotdotnet.com/team/csharp/code/default.aspx
http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=e6098575-dda0-48b8-9abf-e0705af065d9
-mike
MVP
"Christoph Wienands" <cwienands@sswhiteburs.com> wrote in message
news:%23wy%23XBJUDHA.2008@TK2MSFTNGP11.phx.gbl...
> Hi,
>
> I'm currently trying to solve this problem:
>
> I have a web application that has the web.config setting
> <identity impersonate="true" userName="" password=""/>
> This means, the ASP application is executed under the user's
security
> context.
>
> In my application I want to display a list of files from the server
> (actually in a treeview). The user will only see the files that he
has read
> permissions for (based on NTFS security). First reason for this is,
the user
> will not click on files that he does not have access rights for,
second
> reason, administration can be done at the server side by simply
setting file
> security (just like for network shares).
>
> Now here's my problem: My application needs to find out, if the user
is
> allowed to access a certain file. One solution was to use
"File.OpenRead",
> which will throw an error is permission is denied. However, in case
there
> are a couple hundred files, I guess this will cause quite some
overhead.
>
> I looked at the FileIOPermission object but I couldn't figure out
how to use
> it in my case (or if it is suitable for my problem, it looks more as
a class
> to SET or GET permissions).
>
> Any other ideas?
>
> Thanks, Christoph
>
>
- Next message: Michael Giagnocavo [MVP]: "Re: User and Group permissions on a folder"
- Previous message: Shel Blauman [MSFT]: "Re: Custom permissions not throwing exceptions"
- In reply to: Christoph Wienands: "How to find out access permissions for files?"
- Next in thread: Christoph Wienands: "Re: How to find out access permissions for files?"
- Reply: Christoph Wienands: "Re: How to find out access permissions for files?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|