While working on a little backup script I try to change the ACL of a file using Set-Acl in Powershell 1 on Vista and always get the following error message:
Set-Acl : The security identifier is not allowed to be the owner of this object.
This error persists even if I go a minimal script:
$acl = Get-Acl $sourcepath$file $acl |format-list Set-Acl -path $sourcepath$file -AclObject $acl
Does anyone know the reason for this error? Obviously I'm not changing the ownership of the file...
BTW: What I ultimately want to achieve is to reduce all access rights to ReadAndExecute. Is there maybe an easier way of doing this in Powershell?
Thanks for your help! Ulrich