Icacls d:\users /setowner “everyone” /t /c
then you need grant permission for user access, run comand:
icacls d:\users /grant everyone:(OI)(CI)F /T
F= Full ControlCI= Container Inherit – This flag indicates that subordinate containers will inherit this ACE.OI= Object Inherit – This flag indicates that subordinate files will inherit the ACE./T= Apply recursively to existing files and sub-folders. (OIandCIonly apply to new files and sub-folders). Credit: comment by @AlexSpence.