How to SAVE a file security change ?

delphi package - easy access to security apis
Post Reply
imbra
Posts: 3
Joined: Tue Jun 07, 2005 9:01 am

How to SAVE a file security change ?

Post by imbra »

Hi,

i have a problem - how to save my changes of a directory acl change ?

If i try this :


SecurityObject := FileSecurity(Filename);
SecurityObject.ProtectedDAcl := False;
SecurityObject.DAcl.DeleteItems(Account('Users'));
if SecurityObject.DAcl.IsDirty then
if SecurityObject.DAcl.Flush then
ShowMessage('Fush OK!')
else
ShowMessage('Fush NOT !!!!!!!!!!! OK!');
SecurityObject.DAcl.Flush;

But after FLUSH - the rights are the same ....

What's wrong ? Help please....

BTW: Madshi MadCollection is the best !! :D
imbra
Posts: 3
Joined: Tue Jun 07, 2005 9:01 am

SACL instead of DACL

Post by imbra »

I have to use SACL instead of DACL and then it works wonderfull !

:blush:
Post Reply