From: Brian Inglis <Brian.Inglis@Shaw.ca>
To: cygwin@cygwin.com
Cc: Martin Wege <martin.l.wege@gmail.com>
Subject: Re: mkfifo: cannot set permissions of 'x.fifo': Not a directory
Date: Mon, 7 Aug 2023 12:26:53 -0600 [thread overview]
Message-ID: <c8daacfa-b441-ebbb-90da-03318080479c@Shaw.ca> (raw)
In-Reply-To: <CANH4o6O-8O-iMaHowDuy0y7H=pVfZ-3EvubDmTdjGVSST8FkAQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1336 bytes --]
On 2023-08-07 08:42, Martin Wege via Cygwin wrote:
> We get a weird mkfifo failure in Cygwin on NTFS:
>
> /usr/bin/mkfifo -m 600 x.fifo
> mkfifo: cannot set permissions of 'x.fifo': Not a directory
This error is also reproducible with default fifo permissions 666 or anything
else, and appears to be returned by gen_full_path_at() in syscalls.cc when
called with a fifo: see attached strace extract - underlying Windows file is
Windows shortcut x.fifo.lnk.
> Is there a known workaround? So far named fifos cannot be created somehow.
For now, create with default permissions then chmod:
$ mkfifo x.fifo && chmod 600 x.fifo
mode of 'x.fifo' changed from 0666 (rw-rw-rw-) to 0600 (rw-------)
$ ls -glo x.fifo{,.lnk}
prw------- 1 0 Aug 7 12:07 x.fifo
prw------- 1 0 Aug 7 12:07 x.fifo.lnk
$ readshortcut -af x.fifo
Target: /usr/src/
Working Directory: /usr/src/
Arguments:
Show Command: Normal
Icon Library: /usr/src/
Icon Library Offset: 0
Description: :\0:c4:1180
--
Take care. Thanks, Brian Inglis Calgary, Alberta, Canada
La perfection est atteinte Perfection is achieved
non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add
mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut
-- Antoine de Saint-Exupéry
[-- Attachment #2: mkfifo-m666.strace.log --]
[-- Type: text/plain, Size: 1890 bytes --]
open: open(x.fifo, 0x2140000)
normalize_posix_path: src x.fifo
cwdstuff::get: posix /usr/src
cwdstuff::get: (/usr/src) = cwdstuff::get (0x1250720, 32768, 1, 0), errno 0
normalize_posix_path: /usr/src/x.fifo = normalize_posix_path (x.fifo)
mount_info::conv_to_win32_path: conv_to_win32_path (/usr/src/x.fifo)
mount_info::conv_to_win32_path: src_path /usr/src/x.fifo, dst C:/.../cygwin64/usr/src/x.fifo, flags 0x30008, rc 0
symlink_info::check: 0xC0000034 = NtCreateFile (/??/C:/.../cygwin64/usr/src/x.fifo)
symlink_info::check: 0xC0000034 = NtQueryInformationFile (/??/C:/.../cygwin64/usr/src/x.fifo)
symlink_info::check: 0xC0000034 = NtCreateFile (/??/C:/.../cygwin64/usr/src/x.fifo.exe)
symlink_info::check: 0xC0000034 = NtQueryInformationFile (/??/C:/.../cygwin64/usr/src/x.fifo.exe)
symlink_info::check: 0x0 = NtCreateFile (/??/C:/.../cygwin64/usr/src/x.fifo.lnk)
symlink_info::check: is a device
symlink_info::check: 0 = symlink.check(C:/.../cygwin64/usr/src/x.fifo.lnk, 0x7FFFFB760) (mount_flags 0x30008, path_flags 0x14)
path_conv::check: this->path(C:/.../cygwin64/usr/src/x.fifo.lnk), has_acls(1)
build_fh_pc: fh 0x800008DF0, dev 000000C4
fhandler_base::open: (/??/C:/.../cygwin64/usr/src/x.fifo.lnk, 0x2148000)
fhandler_base::set_flags: flags 0x2148000, supplied_bin 0x10000
fhandler_base::set_flags: filemode set to binary
fhandler_base::open: 0x0 = NtCreateFile (0x1F8, 0x20080, /??/C:/.../cygwin64/usr/src/x.fifo.lnk, io, NULL, 0x0, 0x7, 0x1, 0x4000, NULL, 0)
fhandler_base::open: 1 = fhandler_base::open(/??/C:/.../cygwin64/usr/src/x.fifo.lnk, 0x2148000)
fhandler_base::open_fs: 1 = fhandler_disk_file::open(/??/C:/.../cygwin64/usr/src/x.fifo.lnk, 0x2148000)
open: 3 = open(x.fifo, 0x2148000)
__set_errno: int gen_full_path_at(char*, int, const char*, bool):4445 setting errno 20
close: close(3)
fhandler_base::close: closing '/usr/src/x.fifo' handle 0x1F8
close: 0 = close(3)
next prev parent reply other threads:[~2023-08-07 18:26 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-07 14:42 Martin Wege
2023-08-07 18:26 ` Brian Inglis [this message]
2023-08-07 19:14 ` Corinna Vinschen
2023-08-07 21:14 ` Martin Wege
2023-08-08 8:20 ` Corinna Vinschen
2023-08-08 19:38 ` Martin Wege
2023-08-09 8:01 ` Corinna Vinschen
2023-08-09 9:12 ` Martin Wege
2023-08-09 9:56 ` Corinna Vinschen
2023-08-10 12:49 ` Martin Wege
2023-08-18 4:02 ` Martin Wege
2023-08-18 8:34 ` Corinna Vinschen
2023-08-18 13:14 ` Martin Wege
2023-08-21 4:49 ` Cedric Blancher
2023-08-21 8:37 ` Corinna Vinschen
2023-08-22 14:52 ` [EXTERNAL] " Lavrentiev, Anton (NIH/NLM/NCBI) [C]
2023-08-22 23:05 ` How to fix |mkfifo()| failure if |pathname| is on NFS ? / was: " Roland Mainz
2023-08-24 16:45 ` Martin Wege
2023-08-25 4:25 ` Cedric Blancher
2023-08-26 17:58 ` Martin Wege
2023-08-25 12:18 ` Corinna Vinschen
2023-08-25 12:25 ` Corinna Vinschen
2023-08-26 11:26 ` Cedric Blancher
2023-08-26 14:15 ` Corinna Vinschen
2023-08-26 17:40 ` Martin Wege
2023-08-26 19:16 ` Brian Inglis
2023-08-25 15:14 ` Roland Mainz
2023-08-26 11:27 ` Cedric Blancher
2023-08-25 23:21 ` Lavrentiev, Anton (NIH/NLM/NCBI) [C]
2023-08-26 14:28 ` Corinna Vinschen
2023-08-26 14:39 ` Lavrentiev, Anton (NIH/NLM/NCBI) [C]
2023-08-26 17:44 ` Documenting Cygwin on NFS, no longer only exchange-medium! " Martin Wege
2023-08-26 19:16 ` Brian Inglis
2023-08-27 12:35 ` Corinna Vinschen
2023-08-28 5:35 ` Cedric Blancher
2023-08-28 10:02 ` Corinna Vinschen
2023-08-28 11:41 ` Joshuah Hurst
[not found] ` <14a692f6-7244-4a7e-a69b-d14521fb01e8@secure-endpoints.com>
2023-08-23 17:39 ` Lavrentiev, Anton (NIH/NLM/NCBI) [C]
2023-08-24 5:28 ` Cedric Blancher
2023-08-24 16:40 ` Martin Wege
2023-08-21 12:12 ` Martin Wege
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c8daacfa-b441-ebbb-90da-03318080479c@Shaw.ca \
--to=brian.inglis@shaw.ca \
--cc=cygwin@cygwin.com \
--cc=martin.l.wege@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).