Posts

Showing posts from July, 2015

Cygwin, access control, default groups and just getting it playing nice

correcting current and default permissions If you've been messing with your permissions on copying data across from another NTFS system, some of the owners/groups may be off and the even after correcting the owners and their permissions, any new files don't have the right defaults. This simple script replaces the ACL records for each file and directory, giving the default permissions specified. find $1 -type f -exec setfacl -f facl {} \; find $1 -type d -exec setfacl -f dacl {} \; dacl - directory permissions user::rwx group::rwx other:r-x default:user::rwx default:group::rwx default:other:r-x facl - File Permissions user::rw- group::rw- other:r-- default:user::rw- default:group::rw- default:other:r-- Specifying the default groups for users The documentation for cygwin is in depth but doesn't simply answer the question: How do I set the default group for a user? (in the out of the box configuration). The starting point is the mkpasswd utility. These are the fo