V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
shenwy
V2EX  ›  服务器

Windows Server 创建文件提示文件名过长?

  •  
  •   shenwy · Mar 14, 2022 · 2113 views
    This topic created in 1511 days ago, the information mentioned may be changed or developed.

    请教各位高手们一个问题~

    Windows Server 的存储通过 NFS 挂载到 RedHat ,发现在 RedHat 创建超过 4 个中文的文件就会提示 File name too long ,创建英文文件正常。

    请教一下,这个跟 Windows Server 做了什么额外设置有关吗?还是 NFS 挂载出问题了?

    谢谢~

    3 replies    2022-03-15 09:04:00 +08:00
    baobao1270
        1
    baobao1270  
       Mar 14, 2022
    Windows 默认路径长度是 255 个字符。

    如果你在 Windows 下装过 Python ,安装向导会问你要不要禁用这个限制。

    Python 的解决方案是把 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled 设置为 1
    flynaj
        2
    flynaj  
       Mar 14, 2022 via Android
    这个不是 Windows 的问题,挂载参数或者 RedHat 的 bug
    shenwy
        3
    shenwy  
    OP
       Mar 15, 2022
    @baobao1270
    @flynaj
    感谢,我先确认一下是 Win 还是 RedHat 挂载的问题~
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1274 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 16:52 · PVG 00:52 · LAX 09:52 · JFK 12:52
    ♥ Do have faith in what you're doing.