Setting NTFS permissions

  • Thread starter Thread starter Guest
  • Start date Start date
Jeff,

It could be due to objSecDes not being declared correctly. I have written
similar code in VB.NET with no problems. My declaration of the security
descriptor is as follows

Dim madSecurityDescriptor As SecurityDescriptor = Nothing

I reassign the ACL with the command

madSecurityDescriptor.DiscretionaryAcl = adAccessControlList

Where

Dim adAccessControlList As AccessControlList = Nothing


I hope this helps

Mark
I

Jeff Bunting said:
I'm trying the VB code in KB article 818362, but keep getting a "member
not found" exception on this line:
objSecDes.DiscretionaryAcl = objDAcl

any idea why this would happen?

link to code
http://support.microsoft.com/default.aspx?scid=kb;[LN];818362
 
Thanks, I found the problem. I'd created a directory to test this on, but
there were no files within it, so it was failing on trying to set the
permissions on the nonexistant files.

Jeff

Mark Travis said:
Jeff,

It could be due to objSecDes not being declared correctly. I have written
similar code in VB.NET with no problems. My declaration of the security
descriptor is as follows

Dim madSecurityDescriptor As SecurityDescriptor = Nothing

I reassign the ACL with the command

madSecurityDescriptor.DiscretionaryAcl = adAccessControlList

Where

Dim adAccessControlList As AccessControlList = Nothing


I hope this helps

Mark
I

Jeff Bunting said:
I'm trying the VB code in KB article 818362, but keep getting a "member
not found" exception on this line:
objSecDes.DiscretionaryAcl = objDAcl

any idea why this would happen?

link to code
http://support.microsoft.com/default.aspx?scid=kb;[LN];818362
 
...or so I thought. it worked one time. now it is giving me the same error
again.


Jeff Bunting said:
Thanks, I found the problem. I'd created a directory to test this on, but
there were no files within it, so it was failing on trying to set the
permissions on the nonexistant files.

Jeff

Mark Travis said:
Jeff,

It could be due to objSecDes not being declared correctly. I have written
similar code in VB.NET with no problems. My declaration of the security
descriptor is as follows

Dim madSecurityDescriptor As SecurityDescriptor = Nothing

I reassign the ACL with the command

madSecurityDescriptor.DiscretionaryAcl = adAccessControlList

Where

Dim adAccessControlList As AccessControlList = Nothing


I hope this helps

Mark
I

Jeff Bunting said:
I'm trying the VB code in KB article 818362, but keep getting a
"member
not found" exception on this line:
objSecDes.DiscretionaryAcl = objDAcl

any idea why this would happen?

link to code
http://support.microsoft.com/default.aspx?scid=kb;[LN];818362
 
Back
Top