File permissions precedence

Jean-Pierre Ribeauville 80 Reputation points
2024-07-24T18:12:09.3266667+00:00

Hi,
By setting , via Win32 API , following permissions on a file
Everyone group : deny GENERIC_READ , GENERIC_WRITE , GENERIC_EXECUTE
Onwer User : allow GENERIC_READ , GENERIC_WRITE , GENERIC_EXECUTE

then , when trying to acces to file ( i.e. for editing ) error coe 05 (access denied) is returned .
It looks like the group permissions has precedence on user permissions.
Is it right ?

(By setting Everyone group : allow GENERIC_READ , GENERIC_WRITE , GENERIC_EXECUTE , error 0x05 disappears)

Thx for help.
Regards,
J.P.

Windows API - Win32
Windows API - Win32
A core set of Windows application programming interfaces (APIs) for desktop and server applications. Previously known as Win32 API.
2,616 questions
{count} votes

Accepted answer
  1. RLWA32 45,571 Reputation points
    2024-07-24T18:47:43.7833333+00:00

    A properly constructed security descriptor contains Access Control Entries (ACEs) in a specified order. This is known as the canonical order. You can see the proper ordering by referring to Order of ACEs in a DACL. Notably, deny ACEs take precedence over allow ACEs.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.