|
security
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Directory access checkHi,
I need to check the current principal's read-, write- and full control access to a given directory without using try-catch. Any suggestions will be highly appreciated. Best regards Birger Niss Hi,
in .NET 2.0 this functionality is wrapped in the System.Security.AccessControl namespace. In 1.1 there are wrappers out there. Never tried them, though. --------------------------------------- Dominick Baier - DevelopMentor http://www.leastprivilege.com Show quoteHide quote > Hi, > > I need to check the current principal's read-, write- and full control > access to a given directory without using try-catch. > > Any suggestions will be highly appreciated. > > Best regards > Birger Niss Hi Dominick,
With System.Security.AccessControl I may get hold of all the access rules pertaining to a directory. I can then traverse all of these (users and groups) to figure out which rules applies to "me". One problem - however - is that without proper access rights I cannot get hold of the access rules, so this will raise an exception and I'm back at square one. Best regards Birger Show quoteHide quote "Dominick Baier [DevelopMentor]" <dbaier@pleasepleasenospamdevelop.com> wrote in message news:4580be631951d58c7e97bd9653a62@news.microsoft.com... > Hi, > in .NET 2.0 this functionality is wrapped in the > System.Security.AccessControl namespace. In 1.1 there are wrappers out > there. Never tried them, though. > > --------------------------------------- > Dominick Baier - DevelopMentor > http://www.leastprivilege.com > >> Hi, >> >> I need to check the current principal's read-, write- and full control >> access to a given directory without using try-catch. >> >> Any suggestions will be highly appreciated. >> >> Best regards >> Birger Niss > > Hi,
makes sense :) in a similar thread Joe suggested to use the Win32 AuthZAccessCheck function. I have no clue if this is the right approach - but i would love to hear from someone who has successfully used that API :) --------------------------------------- Dominick Baier - DevelopMentor http://www.leastprivilege.com Show quoteHide quote > Hi Dominick, > > With System.Security.AccessControl I may get hold of all the access > rules > pertaining to a directory. I can then traverse all of these (users and > groups) to figure out which rules applies to "me". > One problem - however - is that without proper access rights I cannot > get > hold of the access rules, so this will raise an exception and I'm back > at > square one. > Best regards > Birger > "Dominick Baier [DevelopMentor]" > <dbaier@pleasepleasenospamdevelop.com> wrote in message > news:4580be631951d58c7e97bd9653a62@news.microsoft.com... > >> Hi, >> in .NET 2.0 this functionality is wrapped in the >> System.Security.AccessControl namespace. In 1.1 there are wrappers >> out >> there. Never tried them, though. >> --------------------------------------- >> Dominick Baier - DevelopMentor >> http://www.leastprivilege.com >>> Hi, >>> >>> I need to check the current principal's read-, write- and full >>> control access to a given directory without using try-catch. >>> >>> Any suggestions will be highly appreciated. >>> >>> Best regards >>> Birger Niss
Client/Server application with single login-SecureStream?
Securing a .NET webapp with ActiveDir and SQL-server? Issuing X.509 Certificates System.Security.SecurityException: Request failed. How can I access more properties of the AD Acount authentication problem migrating a Winform+WS to asp.net20+WS Using caspol to import a strong name codegroup How to make Windows inaccessible from my software user? Couldn;t load assembly Instantiate Shell.Explorer.2 at runtime for a web page |
|||||||||||||||||||||||