[Samba] OT? File order on CentOS/Samba server

Miguel Medalha miguelmedalha at sapo.pt
Thu Jan 22 20:28:41 GMT 2009

I hope someone familiar with the way Linux processes files can enlighten 
me on the following:

I recently replaced an old Windows 2000 server with a new machine 
running CentOS 5.2. It uses Samba 3.2.7 to serve a network of Windows XP 

We are a newspaper. We use Acrobat Distiller to batch-convert a folder 
of single-page PostScript files (for print) to a multipage PDF file (for 
electronic distribution).
Running on a workstation, Distiller watches the folder on a Samba share 
and does the conversion, automatically creating bookmarks, indexes and 
other information.

On the Windows server, Distiller processes the files by filename order:


... and so on.

On the Linux server, Distiller processes the files in an order that 
seems arbitrary, for example:


... and so on.

The order Distiller uses is NOT related to the time stamp of the files. 
I tried to copy the files to the watched folder one by one in the 
correct order; the result is the same.

This creates the need to open the final PDF and reshuffle the pages by 
hand, which is very time consuming and prone to error.

There is a workaround to this: use the runfilex script that comes with 
Acrobat: it can contain a list of files to convert, in the order you 
want. Unfortunately, this is not acceptable for us since the process 
then takes about 40 minutes (irrespective of platform or filesystem), 
instead of 3 or 4 minutes.

My question is: how is the order of files determined by Linux when a 
particular order is not explicitly required by a program?

I noted the following:

I have 4 files in a folder: file1.ps, file2.ps, file3.ps, file4.ps. When 
I order them by date, they appear in Windows Explorer in, say, the 
following order: 3, 4, 1, 2
If I copy them to a new folder one by one in the order 1, 2, 3, 4, they 
will still appear in the order 3, 4, 1, 2 when ordered by date. So, what 
information is transported with the files that makes the Linux server 
present them to the world in this order?

Does someone know a workaround to this situation or can someone point me 
to information about file ordering with Linux? By the way, I am using 
the EXT3 file system. I tried the same on a VFAT file system and the 
result is the same. It seems to be a Linux thing, not a file system thing.

Thank you for your patience.

More information about the samba mailing list