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
{{ message }}
Repository navigation
Add chown (set user, set user:group) and chgrp (set group) commands #12660
Add chown (set user, set user:group) and chgrp (set group) commands, please.
Windows has this capability, as demonstrated by SFU, Cygwin, MSYS2.
Example:
Group owner of a file can be changed with this API:
DWORD dwResult = SetSecurityInfo(
hFile, // Handle to the object
SE_FILE_OBJECT, // Type of object (File)
GROUP_SECURITY_INFORMATION, // Information type to set (Primary Group)
NULL, // Owner SID (NULL = don't change)
pSidGroup, // Group SID (The new group SID)
NULL, // DACL (NULL = don't change)
NULL // SACL (NULL = don't change)
);
Activity
oech3 commentedon Jun 6, 2026
Does not cause any issue if Windows native (non-Cygwin) binary was used on MSYS2 shell?
mlwege commentedon Jun 7, 2026
No, why? Cygwin/MSYS2 all use the SetSecurityInfo(...,GROUP_SECURITY_INFORMATION,...) API.
mlwege commentedon Jun 7, 2026
Old Services For UNIX also used SetSecurityInfo(...,GROUP_SECURITY_INFORMATION,...) API