mkdir(2) on Linux [1] is permitted to fail with either EACCES or EXIST according to POSIX [2]. In [3] the possibility was discussed of not throwing AccessDeniedException on Linux when mkdir fails with EACCES and the Path is to a directory. This should be investigated.
[1] https://www.man7.org/linux//man-pages/man2/mkdir.2.html
[2] https://pubs.opengroup.org/onlinepubs/9799919799.2024edition/functions/V2_chap02.html#tag_16_03
[3] https://mail.openjdk.org/pipermail/nio-dev/2024-November/018565.html
[1] https://www.man7.org/linux//man-pages/man2/mkdir.2.html
[2] https://pubs.opengroup.org/onlinepubs/9799919799.2024edition/functions/V2_chap02.html#tag_16_03
[3] https://mail.openjdk.org/pipermail/nio-dev/2024-November/018565.html