This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Shares with strange ACL settings

Corinna Vinschen <corinna-cygwin <at>> writes:
> I don't know what to do about this.  We're talking back and forth
> about reflecting group perms into user perms and whether we do it
> or not, it always seems to have some downside on some installations.

Since there are fundamental differences between how Windows evaluates ACL
vs. what POSIX expects this problem isn't going away anytime soon. 
Depending on how much control you have over the default or inherited ACL you
can pretend these differences are non-existing with varying degrees of
success.  Another fly in that ointment are the Backup/Restore privileges,
but these you can control if you are aware of them.

> > So, it would probably help if I had a mount option to force the ownership to
> > some account that I am never logged in as, either via a mount option or
> > whenever the POSIX user modes are all cleared.  I don't know if that might
> > confuse applications when they check ownership on newly created files,
> > though.  Is that something that is implementable easily so it could be
> > tested via a snapshot?
> I'm not sure I understand the idea of mounting w/ an explicit user account
> and how this might help.  What about just using the noacl mount option
> for weird shares like the above?

That mount option would ensure that the ACL are actually consulted by a
POSIX application when the user mode bits are all cleared since the file
would appear not to be owned by the (E)UID.  The only other option I can see
would be to augment stat to traverse the DACL when both these conditions are
met: the file is owned by the (E)UID of the calling process and the user
mode bits are all cleared.  That is, do the faccessat on behalf of the
application that it would otherwise (likely) do if the file was _not_ owned
by the user.  Of course you can't really know why stat was called and that
might impact perfromance quite noticeably.

As to "why not use the noacl option", that makes the file mode tests
completely useless and requires more elaborate error handling that would
otherwise not be necessary.  Some users and scripts they have written are
not prepared for that extra complication.


Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]