Cygwin making files inaccessible?

Brian Inglis Brian.Inglis@SystematicSw.ab.ca
Mon Feb 7 20:07:56 GMT 2022


On 2022-02-06 22:23, Jay K wrote:
> I looked at this a while. I tried various recent cygwin1.dlls as there were two ACL changes recently.
> Eventually. I noticed the behavior was not the same for every file/directory/volume. Sometimes it worked ok.
> Though I think the ACLs still get changed quite a bit: "full" expands to "many".
> Of course it has worked plenty for me and everyone else.
> Eventually I tried chmod -R 777 * and this seems to have worked.
> I speculate that some "bad" Cygwin ACLs got created at some point.
> And maybe cacls wasn't deleting them?? That parts seems wierd. Maybe on directories?
> Possibly due to those two recent changes, or maybe user error, I don't know.

I found after a Windows level restore from backup I had to retweak a lot 
of Cygwin directory DACLs and directory and file perms;
often setfacl -b does the trick if the file perms "+" ACL flag is set;
when that doesn't work I use scripts that set:

Normal:

perms=a+r,u+w,go-w
dacl=u::rwx,g::r-x,o::r-x,d:u::rwx,d:g::r-x,d:o::r-x

Shared/Sticky/Tmp:

perms=a+rwxt
dacl=u::rwx,g::rwx,o::rwx,d:u::rwx,d:g::rwx,d:o::rwx

Change Windows defaults to Cygwin non-exec defaults:

perms=a+r-x,u+w,go-w
dacl=u::rwx,g::r-x,o::r-x,d:u::rwx,d:g::r-x,d:o::r-x

Add u+x or a+x for executable scripts or commands.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]


More information about the Cygwin mailing list