Search found 5 matches

by petergust
Mon Jan 16, 2006 1:53 pm
Forum: madSecurity
Topic: Set NTFS permissions for folder
Replies: 8
Views: 26634

You can try using the "afObjectInherit, afContainerInherit" flags. If that doesn't work, you might have to manually loop through the child objects... :shock: Btw, I'd suggest using hexadecimal for the flags. That makes it much easier to see which flags are contained. That would be $1301BF...
by petergust
Mon Jan 16, 2006 10:47 am
Forum: madSecurity
Topic: Set NTFS permissions for folder
Replies: 8
Views: 26634

Check out these links: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthz/security/access_mask.asp http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/file_security_and_access_rights.asp Another possibility would be to manually setup the ACL the way you...
by petergust
Mon Jan 16, 2006 8:32 am
Forum: madSecurity
Topic: Set NTFS permissions for folder
Replies: 8
Views: 26634

I'd suggest using IACL.SetFileAccess. This makes it a lot easier for you. The access masks are quite complicated. There are multiple flags which must be ORed together to get proper "read" and "write" access. The method "SetFileAccess" encapsulates this kind of stuff fo...
by petergust
Mon Jan 16, 2006 7:56 am
Forum: madSecurity
Topic: Set NTFS permissions for folder
Replies: 8
Views: 26634

What does "NewItem" return? The first time I run code it returns 4, then 5,6.. What is the sense of that ACE? I mean adding an item with 0 access rights sounds a bit strange to me! It what too late when I did this. When I change it to 1, the user is added but I can't find anything about t...
by petergust
Sun Jan 15, 2006 5:58 pm
Forum: madSecurity
Topic: Set NTFS permissions for folder
Replies: 8
Views: 26634

Set NTFS permissions for folder

Hi! I'm trying to add a new user for a folder': var ISecObj: ISecurityObject; IACLObj: Iacl; begin ISecObj := FileSecurity( 'C:\Test\123' ); IACLObj := ISecObj.DAcl; IACLObj.NewItem(Account('test'),0,atAllowed,[afSuccessfulAccess]); if IACLObj.Flush then ShowMessage('Fush OK!') else ShowMessage('Fus...