How to create a file with rw permissions(0600) on the current user only in Go for Windows?

27 Views Asked by At

Is there a way in Go to programmatically create a file for Windows with 0600 equivalent permissions, or change the permissions of a file to those permissions?

I have tried creating the file with 0600, and also tried setting 0600 with os.Chmod after creation too but it still creates it with -rw-rw-rw-. From what I could find, windows uses ACL and has some inheritance mechanic when there are other users and using Chmod doesn't work.

0

There are 0 best solutions below