Samba logs and Windows browsing
In Pulling useful information out of your Samba log we looked at analyzing and extricating useful data from the samba logs. One of the issues arising from this is that when mapping a Samba share from a Windows system, Samba records files in a folder as being opened individually, even though they have simply been 'browsed'. This has the effect of giving spurious 'file opened' status to my music files as well as blowing the log file itself out of proportion.
So for example in opening the below folder, each file becomes listed in the Samba log as if it has been individually opened..
This might seem to be related to Samba's log level entry in smb.conf. However going down to log level = 1 causes no files to be listed at all and cranking it up to log level = 3 creates a monster of a log file with way too much information. So the issue is not with the Samba logging itself.
The problem only happens when browsing shared directories from a Windows workstation; connecting to shares using other Linux based systems or Android smartphones does not cause the whole directory contents to be logged - only files actually opened/played. The difference is that under Windows, I have MP3-Info installed which gives the file bitrate as an icon (above).
Windows systems default to a fancy icon for various files and the system reads each file to allocate the appropriate image. Nautilus under Linux doesn't give a rat's arse about such beautification and simply lobs files together with generic icons.
This iconifying behaviour can sometimes be turned off depending on the state and version of your Windows Explorer. Not being a fan of the standard Explorer, I searched for an alternative file manager which would give me this functionality. After some testing I have settled upon xplorer
This app is free for personal use and is highy configurable. With plain icons turned on I can browse folders of music without blowing out the Samba log with unecessary 'false positives'.