Permissions of file on folder

Hi everyone!

I need some help. I need to know the security permissions of a file in the folder located in "C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys"
the file starts with a number and letters and then with an underscore and is filled with the contents of a registry key value. I can’t find a way to get the permissions that this file has (administrator, system, etc) . So far I can find the path using the following query:
( concatenation "" of ("C:\ProgramData\Microsoft\Crypto\RSA\MachineKeys\76944fb33636aeddb9590521c2e8815a_"; (value "MachineGuid" of key "HKEY_LOCAL_MACHINE\Software\Microsoft\Cryptography" of native registry) as string))

But all I found is to list permissions for folders not files, and I don’t know if getting the path this way would mean an error to find the permissions.

can anyone help me?

Thank you!

The relevance for permissions of files or folders should be the same. If your existing query correctly locates the file, then you should be able to retrieve a file object using

File (your relevance)

From there, the discussion of DACLS and SDDL at Relevance: verify file permission and adjust accordingly should help.

2 Likes

It works perfectly.

Thank you!!

1 Like