If you do not want to interfere with the API (i.e. SetNamedSecurityInfo), you can bypass the request like this:
echo y|cacls filename /d everyone
Since echo is built-in, in order to call this command line from your program, you probably have to run:
cmd.exe /c echo y|cacls filename /d everyone
Jimg source share