You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Search for MSYS2 in your start menu, right-click and start any of the environments as Administrator
Create a file in your home directory with touch example.txt
Open the location in Windows Explorer, select example.txt, hit Alt+Enter, select the Security tab and then click Advanced, notice the owner of the file is your username and not the Administrators group
When using any suitable tool to create a file in Command Prompt and PowerShell as Administrator, the owner of the file is the Administrators group as expected.
This problem also goes for any command executed through the bash shell built as part of MSYS2 as well and can result in unexpected behaviour when CLI tools expect that creation of files in an elevated context will be owned by the Administrators group.
Expected behavior
Any file created in a privileged window would be owned by the Administrators group, matching Command Prompt, PowerShell and Windows Explorer.
Actual behavior
Files created using any tools compiled for MSYS2 in a privileged window are owned by the user account, not the Administrators group.
Here's a demonstration using PowerShell running as Administrator. Even without being in the MSYS2 Bash shell, executing touch results in incorrect permissions.
Description / Steps to reproduce the issue
touch example.txt
When using any suitable tool to create a file in Command Prompt and PowerShell as Administrator, the owner of the file is the Administrators group as expected.
This problem also goes for any command executed through the bash shell built as part of MSYS2 as well and can result in unexpected behaviour when CLI tools expect that creation of files in an elevated context will be owned by the Administrators group.
Expected behavior
Any file created in a privileged window would be owned by the Administrators group, matching Command Prompt, PowerShell and Windows Explorer.
Actual behavior
Files created using any tools compiled for MSYS2 in a privileged window are owned by the user account, not the Administrators group.
Verification
Windows Version
MSYS_NT-10.0-26100
Are you willing to submit a PR?
I'm unaware how to rectify this issue I'm afraid.
The text was updated successfully, but these errors were encountered: