Why cannot I chmod in Cygwin on Windows 8 CP?

Do an ls -al and you will see that your files do not belong to any group (none).

Just do a chgrp Users * on your files, and you are fine again.


Roi Danton's solution works, however it does not solve the root cause, and the issue will recur with any user-created file on which you want to change the permissions.

To fix the problem permanently:

  1. Look up the group ID of the "Users" group in /etc/group (or the equivalent group name for your locale).

    In my installation this was 545 (your mileage may vary). cat /etc/group|egrep '^Users:' will get you the correct line. The third field on the line is the group id. (cat /etc/group|egrep '^Users:'|cut -f3 -d':' to just get the id).

  2. Edit your /etc/passwd file. Locate the record for your user. The fourth field is the "primary group" for the user. It is incorrectly set to a non-existent group. Change that number to the number you found in step 1 above. Save the etc password file.

  3. Close any open Cygwin windows/terminals and then open a new one. Create a new file. It should have a group of "Users", and you should be able to change its permissions as desired.