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
- 347 Beta Program
- 2.1K Nebula
- 115 Nebula Ideas
- 77 Nebula Status and Incidents
- 5K Security
- 44 USG FLEX H Series
- 246 Security Ideas
- 1.2K Switch
- 64 Switch Ideas
- 900 WirelessLAN
- 33 WLAN Ideas
- 5.8K Consumer Product
- 204 Service & License
- 326 News and Release
- 71 Security Advisories
- 21 Education Center
- 5 [Campaign] Zyxel Network Detective
- 1.8K FAQ
- 832 Nebula FAQ
- 402 Security FAQ
- 219 Switch FAQ
- 190 WirelessLAN FAQ
- 45 Consumer Product FAQ
- 136 Service & License FAQ
- 34 Documents
- 34 Nebula Monthly Express
- 71 About Community
- 61 Security Highlight