Stop Finder from rounding file sizes on Samba shares

Feb 10, '11 07:30:00AM

Contributed by: bedouin

If you have a Linux or BSD machine running Samba you may notice that its exported shares round up all files under a megabyte (i.e. 720kB becomes 1MB) by Finder.

To fix this problem add the following line to the server's smb.conf:

allocation roundup size = 0

Restart the Samba daemon, reconnect to the share, and files under one megabyte should now be calculated correctly in Finder.

[crarko adds: I haven't tested this one. I would assume (but don't know) that this change may also be needed to the Samba server on a Mac.

On most systems this file is located at /etc/samba/smb.conf or /usr/local/samba/lib/smb.conf. In Snow Leopard the location is /etc/smb.conf. You may want to save off a backup copy of the file prior to editing it. To save it you need an editor that can authenticate as root, such as TextWrangler or BBedit or you can use a command line editor invoked with sudo.]

Comments (6)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20110208234803495