The Windows 2022 is fresh installed.
I have a local user v in group Users.
I also have a native app called work.exe who has a config file config.xml.
I copied the 2 files, from VM share folder, into %LocalAppData%\work\, then run work.exe.
Then it says it has no permission to open config.xml.
I removed the config.xml and tried again. The app created the file successfully.
I restored config.xml, change the folder work, let Everyone have Full control, recursively.
Try run work.exe again, still access denied.
I used robocopy to copy the folder locally, still not work.
Reboot does not work.
Temporary solution: I packed the folder to zip on other Windows OS, then unpack the zip to %LocalAppData%, via VM share folder, without modifying permissions, which works.
It seems A would not have permission to modify files created by B.
How does it go? Why copy by explorer.exe (even locally) is different to copy by explorer.exe from zip file?
Update 1:
Result by Process Monitor:
CreateFile
ACCESS DENIED
Desired Access: Generic Read/Write, Disposition: Open, Options: Synchronous IO Non-Alert, Non-Directory File, Open No Recall, Attributes: n/a, ShareMode: Read, AllocationSize: n/a
Update 2:
I copied the 2 files, from VM share folder
In VMware, Mount a win7 vdisk readonly to /p1/win7.
(/p1 and /p1/win7 all owned by root:root, initially 755)
Then map /p1/win7 as a Web Drive share folder, with readonly to Win2022.
Everything copied from that folder has this issue.
But I can just open the maybe-locked file in notepad.exe.