<!--#include file="AspUser.inc"-->


' Display all permissions for a file

Set AU = Server.CreateObject("Persits.AspUser")
Set File = AU.File("d:\somefile.txt")

For i = 1 to File.DenialCount
   Set Ace = File.GetDenialAce(i)
   Response.Write Ace.AccountName & " -- No Access<br>"

For i = 1 to File.AllowanceCount
   Set Ace = File.GetAllowanceAce(i)
   Response.Write Ace.AccountName & " -- "

   If Ace.CheckFlag(FILE_READ_DATA) Then Response.Write "R"
   If Ace.CheckFlag(FILE_WRITE_DATA) Then Response.Write "W"
   If Ace.CheckFlag(FILE_EXECUTE) Then Response.Write "X"
   If Ace.CheckFlag(DELETE) Then Response.Write "D"
   If Ace.CheckFlag(WRITE_DAC) Then Response.Write "P"
   If Ace.CheckFlag(WRITE_OWNER) Then Response.Write "O"

   Response.Write "<BR>"