permission problems with Azure
Roland Mainz
roland.mainz@nrubsig.org
Tue Aug 12 16:01:34 GMT 2025
On Tue, Aug 5, 2025 at 3:27 PM ben-xD via via Cygwin <cygwin@cygwin.com> wrote:
>
> [sending on behalf of *ben-xD* , redirected from
> https://github.com/mintty/mintty/issues/563#issuecomment-3155007226]
>
> Dear Cygwin mailing list,
>
> I'd previously been happily using Cygwin on a non Azure AD enrolled
> machine, but am now setting up a machine that is enrolled.
>
> The problem is some packages fail to install due to permissions
> issues when I first launch the Cygwin |setup-x86_64.exe|. |126| is a
> permissions error code:
>
> Screenshot:
> https://github.com/user-attachments/assets/bf156f43-69d9-4ef7-aa01-0f0c8a80c44a
>
> As soon as I launch Cygwin, I see
>
> -bash: /usr/bin/hostname: Permission denied
>
> |bash -l| also fails:
>
> $ bash -l
> bash: /usr/bin/hostname: Permission denied
>
> |find| fails:
>
> $ /usr/bin/find
> bash: /usr/bin/find: Permission denied
That sounds like a Microsoft Defender problem, which - depending on
settings - blocks *.exe which have system tools with the same name in
$PATH.
Example:
---- snip ----
$ which -a hostname
/usr/bin/hostname
/cygdrive/c/Windows/system32/hostname
---- snip ----
Defender thinks that /usr/bin/hostname tries to impersonate
/cygdrive/c/Windows/system32/hostname, and therefore blocks it's
execution.
Could you please try whether this fixes the problem for you (see
https://learn.microsoft.com/en-us/defender-endpoint/attack-surface-reduction-rules-reference
section "Block use of copied or impersonated system tools"):
$ powershell -Command 'Set-MpPreference
-AttackSurfaceReductionRules_Ids C0033C00-D16D-4114-A5A0-DC9B3A7D2CEB
-AttackSurfaceReductionRules_Actions Disabled #
... and please respond back to the list whether it worked, because
this more or less has become a candidate for the Cygwin FAQ... ;-(
----
Bye,
Roland
--
__ . . __
(o.\ \/ /.o) roland.mainz@nrubsig.org
\__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer
/O /==\ O\ TEL +49 641 3992797
(;O/ \/ \O;)
More information about the Cygwin
mailing list