On Wed, 25 Dec 2024 01:29:47 +0100 Bruno Haible wrote: > Hi, > > The behaviour of the access(_, X_OK) call has changed for administrator > users in Cygwin 3.5.5. I don't know whether that's intended or not > (haven't seen it mentioned in > <https://sourceware.org/pipermail/cygwin-announce/2024-December/012023.html>). > > How to reproduce: > ========================== foo.c =========================== > #include <stdio.h> > #include <fcntl.h> > #include <string.h> > #include <grp.h> > #include <unistd.h> > int main () > { > close (creat ("file", 0600)); > chmod ("file", 0400); > printf ("file X_OK ? %d\n", access ("file", X_OK)); > } > ============================================================ > 1. In a normal Cygwin console (mintty): > $ rm -f file > $ gcc -Wall foo.c > $ ./a > => file X_OK ? -1 > 2. In a Cygwin console that runs "as administrator": > $ ./a > => In Cygwin 3.4.6: file X_OK ? -1 > In Cygwin 3.5.5: file X_OK ? 0
Thanks for the report. It is natural that the previleged account such as Administrator and root (linux) have a full permission even with mode 400. However, x permission should not be asserted for mode 400 even for Administrator/root, while it should enabled for mode 500, 410, 401 etc. Let me consider how to fix that. -- Takashi Yano <takashi.y...@nifty.ne.jp> -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple