How to configure Samba share to sort alphabetically?

Nickba
Posts: 17
Freshman Member

Hello,
I have a NAS326 and I have some devices that cannot sort alphabetically on clients end. I need to configure need the NAS326 to sort alphabetically. I tried to edit the smb.conf, but it didn’t work.
#NAS_Jan_2020
I have a NAS326 and I have some devices that cannot sort alphabetically on clients end. I need to configure need the NAS326 to sort alphabetically. I tried to edit the smb.conf, but it didn’t work.
#NAS_Jan_2020
0
All Replies
-
AFAIK Samba doesn't do any sorting at all. That is left to the client.What did you try to change in smb.conf?0
-
Hello,Thanks for replying. I have a Synology NAS and it does have an option to sort alphabetically.I put this in the smb.conf:vfs objects = dirsortDoes anyone have any tip to make it work?
0 -
OK. A vfs module is a sort of plugin. In this case the module is part of the samba suite. The NAS might have a stripped down version which doesn't contain this plugin. Don't know if that is possible.How did you test the smb.conf change? Did you restart samba after that?/etc/init.d/samba.sh restartAn other option is to sort the files on the NAS itself. This is only feasible on mainly static shares, as new files aren't added alphabetically.Sorting is easy:sucd /path/to/sharemkdir tmpsortmv * tmpsort/mv tmpsort/* .rmdir tmpsortNote the dot at the end of the 2nd mv. The theory here is that the shell will exchange the * by an (alphabetically sorted) list of filenames, and mv will move them in that sequence. As the move is within the same filesystem, it's only administative, and blazing fast.0
-
Hello Mijzelf,Thanks again for replying.Yes, I did restart samba after I changed the smb.conf and it didn't work.I tried your suggested static solution, it moved the the files ok, but when I tested on the network, the files didn't sort alphabetically. Maybe samba pick the files randomly to show the list if vfs objects = dirsort cannot be used.Do you know if there is a way to configure the NFS plugin app to sort alphabetically? I am asking because the clients also support NFS.
0 -
Hello again,I installed OMV on an old PC and it accepts the option vfs objects = dirsort and works perfectly.Do you know a simple method of installing OMV on the NAS326?
0 -
0
Categories
- All Categories
- 417 Beta Program
- 2.5K Nebula
- 160 Nebula Ideas
- 108 Nebula Status and Incidents
- 5.9K Security
- 331 USG FLEX H Series
- 286 Security Ideas
- 1.5K Switch
- 78 Switch Ideas
- 1.2K Wireless
- 42 Wireless Ideas
- 6.6K Consumer Product
- 259 Service & License
- 402 News and Release
- 86 Security Advisories
- 31 Education Center
- 10 [Campaign] Zyxel Network Detective
- 3.8K FAQ
- 34 Documents
- 34 Nebula Monthly Express
- 85 About Community
- 80 Security Highlight