И вот в Bullseye (Debian 11) оказалось, что я не могу записать такой файл на раздел NTFS на внешнем USB диске.
man ntfs-3g показал, что
Код: Выделить всё
Windows Filename Compatibility
    NTFS supports several filename namespaces: DOS, Win32 and POSIX.  While
    the  ntfs-3g driver handles all of them, it always creates new files in
    the POSIX namespace for maximum portability and  interoperability  rea‐
    sons.   This means that filenames are case sensitive and all characters
    are allowed except '/' and '\0'. This is perfectly  legal  on  Windows,
    though  some application may get confused. The option windows_names may
    be used to apply Windows restrictions to new file names.
Код: Выделить всё
windows_names
       This option prevents files, directories and extended  attributes
       to be created with a name not allowed by windows, because
              - it contains some not allowed character,
              - or the last character is a space or a dot,
              - or the name is reserved.
       The forbidden characters are the nine characters " * / : < > ? \
       | and those whose code is less than 0x20, and the reserved names
       are  CON,  PRN, AUX, NUL, COM1..COM9, LPT1..LPT9, with no suffix
       or followed by a dot.
       Existing such files can still be read (and renamed).
Но хотелось бы, чтобы это возможность была после автоматического монтирования раздела NTFS.
Можно ли это сделать?
P.S. Решил поискать windows_names в разных файлах. Нашёл в
/etc/udisks2/mount_options.conf.example -- но там во всех строках в начале стоит #
/usr/share/bash-completion/completions/_mount.linux -- но непохоже, чтобы от него что-то зависило
и ещё в трёх исполняемых ELF-файлах:
/usr/bin/lowntfs-3g
/usr/bin/ntfs-3g
/usr/libexec/udisks2/udisksd
Похоже, что опция windows_names жёстко задана в последней программе.