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
- 415 Beta Program
- 2.4K Nebula
- 147 Nebula Ideas
- 96 Nebula Status and Incidents
- 5.7K Security
- 262 USG FLEX H Series
- 271 Security Ideas
- 1.4K Switch
- 74 Switch Ideas
- 1.1K Wireless
- 40 Wireless Ideas
- 6.4K Consumer Product
- 249 Service & License
- 387 News and Release
- 84 Security Advisories
- 29 Education Center
- 10 [Campaign] Zyxel Network Detective
- 3.5K FAQ
- 34 Documents
- 34 Nebula Monthly Express
- 85 About Community
- 73 Security Highlight