Accessing long filenames (directories) via SMB

Windows can enable long filename support via the registry, but long filenames are not supported in TrueNAS and SMB access. I’m not sure which side is causing the problem, but I’d like to know if it’s possible to improve this in the future.

1 Like

How long of filenames are we talking about? The problem generally is that it’s one thing to do this on a local filesystem, and another to do it on a server. In the latter case you start breaking clients in new and interesting ways if they don’t expect the change. Are you talking about path length or actual length of the file’s name?

The complete filename (including the directory) would look something like: /mnt/pool/longfoldername/longfilename.mp4

In an SMB share, it would typically be \server\Data\Video\longfoldername/longfilename.mp4

More than 256 bytes in a file name is not going to happen. It will most likely break a large number of SMB clients. Longer paths with multiple components is possible.

```
smb: \aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb> allinfo foo
altname: foo
create_time: Tue Nov 25 20:22:24 2025 CST
access_time: Tue Nov 25 20:22:24 2025 CST
write_time: Tue Nov 25 20:22:24 2025 CST
change_time: Tue Nov 25 20:22:24 2025 CST
attributes: A (20)
```
Have you tested this?