mkfifo: cannot set permissions of 'x.fifo': Not a directory
Brian Inglis
Brian.Inglis@Shaw.ca
Mon Aug 7 18:26:53 GMT 2023
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
-------------- next part --------------
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)
More information about the Cygwin
mailing list