Bug 6182 - server doesn't supply file list presorted
Summary: server doesn't supply file list presorted
Status: RESOLVED WONTFIX
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: File Services (show other bugs)
Version: 3.0.22
Hardware: x86 Windows XP
: P3 minor
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-11 05:56 UTC by Kerry Channing
Modified: 2009-03-11 12:30 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kerry Channing 2009-03-11 05:56:24 UTC
Hello there, I have a problem where my Samba shared folder is behaving differently to a windows server share. It's is emerging from a director application which reads a list of folders and renders them in a list box without sorting first. With a windows server, the list is supplied pre-sorted, but for some reason (efficiency?different underlying file system?) samba supplies the list in the order saved to disk. 
This means that for our courseware application, as we add new courses, they come at the bottom of the course list rather than sorted in the list. Any thoughts?

I have confirmed this by using smbclient and here's the output:

  .                                   D        0  Mon Nov 24 18:47:40 2008
  ..                                  D        0  Thu Sep 20 15:08:33 2007
  Access 2003                         D        0  Thu Sep 20 18:18:54 2007
  Accounts - Basic Book-keeping       D        0  Thu Sep 20 18:00:49 2007
  Data Entry                          D        0  Thu Sep 20 18:02:23 2007
  DreamWeaver 4.0                     D        0  Thu Sep 20 18:10:10 2007
  DreamWeaver 4.0 Advanced            D        0  Thu Sep 20 18:19:22 2007
  Dreamweaver 8                       D        0  Thu Sep 20 18:13:11 2007
  Effective Business Communication      D        0  Thu Sep 20 18:19:07 2007
  Excel 2003                          D        0  Thu Sep 20 18:37:49 2007
  Excel 2003 Expert                   D        0  Thu Sep 20 18:27:08 2007
  Faster Keyboarding Part 1           D        0  Thu Sep 20 18:25:22 2007
  Faster Keyboarding Part 2           D        0  Thu Sep 20 18:27:10 2007
  Frontpage 2000                      D        0  Thu Sep 20 18:16:50 2007
  Get Into Journalism                 D        0  Thu Sep 20 18:15:53 2007
  Get Into Marketing                  D        0  Thu Sep 20 18:25:45 2007
  Get Into Personnel                  D        0  Thu Sep 20 18:24:17 2007
  Get Into PR                         D        0  Thu Sep 20 18:25:49 2007
  HTML                                D        0  Thu Sep 20 18:15:42 2007
  Internet Skills                     D        0  Thu Sep 20 18:19:39 2007
  Keyboard Speed Development          D        0  Thu Sep 20 18:07:33 2007
  Legal Civil Litigation              D        0  Thu Sep 20 18:15:31 2007
  Legal Company Law                   D        0  Thu Sep 20 18:16:11 2007
  Legal Conveyancing                  D        0  Thu Sep 20 18:10:10 2007
  Legal Criminal Law                  D        0  Thu Sep 20 18:11:00 2007
  Legal Family Law                    D        0  Thu Sep 20 18:18:57 2007
  Office 2007 ... Fast!               D        0  Thu May 22 15:27:57 2008
  Legal Wills and Probate             D        0  Thu Sep 20 18:14:21 2007
  Mail merge Word 2003                D        0  Thu Sep 20 18:23:45 2007
  Medical Secretary  Introduction      D        0  Thu Sep 20 18:16:26 2007
  Medical Secretary Audio Transcription      D        0  Thu Sep 20 18:17:33 2007
  Outlook 2003                        D        0  Thu Sep 20 18:39:10 2007
  PC Basics                           D        0  Thu Sep 20 18:28:10 2007
  Photoshop 6                         D        0  Thu Sep 20 18:39:21 2007
  Powerpoint 2003                     D        0  Thu Sep 20 18:40:32 2007
  Publisher 2003                      D        0  Thu Sep 20 18:40:58 2007
  Sage Line 50 v12                    D        0  Thu Sep 20 18:42:41 2007
  Sage Payroll v10                    D        0  Thu Sep 20 18:44:12 2007
  Windows XP                          D        0  Thu Sep 20 18:44:56 2007
  Word 2003                           D        0  Thu Sep 20 18:47:58 2007
  Word 2003 Expert                    D        0  Thu Sep 20 18:29:06 2007
  Word & Excel Fast                   D        0  Thu Sep 20 18:29:23 2007
  Legal Introductory                  D        0  Thu Sep 20 18:22:40 2007
  Go... Make a Difference!            D        0  Thu Jul 17 13:11:42 2008
  Office 2007 ... Fast! Modules 4-6      D        0  Thu Jul 17 14:49:02 2008
  Communication at Work               D        0  Thu Jul 17 15:09:55 2008
  Word 2007 Part 1                    D        0  Tue Sep 23 12:33:32 2008
  Excel 2007 Part 1                   D        0  Mon Nov 24 18:49:29 2008
Comment 1 Jeremy Allison 2009-03-11 11:40:04 UTC
This is working as designed. CIFS doesn't guarantee a sorted directory listing. If you need this someone was working on a vfs module that did alphanumeric sorting (available on the samba-technical list).
Jeremy.
Comment 2 Kerry Channing 2009-03-11 12:30:18 UTC
Thanks for assistance- I found a link here

http://code.google.com/p/samba-dirsort-vfs/