zeldor.biz

Linux, programming and more

Copyright © 2023
Log in

Samba hide Thumbs.db

August 3, 2012 by Igor Drobot 3 Comments

I have some samba servers with a lot of different shares, all thees share are accessed from different systems like Windows MAC OS X and Linux. Each system let some garbage like:

.DS_Store, Desktop Services Store is a hidden file created in every local folder in Mac OS X. This file stores custom attributes such as position of each folder icons and the choice of background colors. By default it will be created in every local folder accessed by Mac OS X :(

.TemporaryItems, if you are mounting the shares to a Mac, then OS-X is likely creating them:

And I hate theese stupid Thumbs.db files:

If you want to prevent users from seeing all these files completely, you can hide them in your share section:

From smb.conf:

1
2
3
4
5
6
7
8
[Data]
    comment = Samba on Leonardo
    path = /opt/Samba
    hosts allow = 10.1.100.0/24 192.168.2.141 10.0.0.3
    guest ok = yes
    browsable = yes
    writable = yes
    veto files = /Thumbs.db/.DS_Store/._.DS_Store/.apdisk/

[Data] comment = Samba on Leonardo path = /opt/Samba hosts allow = 10.1.100.0/24 192.168.2.141 10.0.0.3 guest ok = yes browsable = yes writable = yes veto files = /Thumbs.db/.DS_Store/._.DS_Store/.apdisk/

Filed Under: Apple, Linux, Macroeconomic, Nmap, Virtualization Tagged With: Apple, Samba, smbd, Thumbs.db

Categories

Archives

Tags

apache2 Apple arduino ARM Automation backup bash Cisco Cluster Corosync Database Debian Debian squeeze DIY DNS Fedora FTP Fun Icinga Ipv6 KVM Linux LVM MAC OS X Monitoring MySQL Nagios Nginx openSUSE OpenVPN PHP Proxy Python python3 qemu RAID rsync Samba security ssh Ubuntu virtualization Windows Windows 7 Wordpress

Comments

  1. Thomas Devoogdt says

    January 4, 2018 at 09:24

    @Vilcker

    Probably you haven’t the correct read & write access since those files are created with another system. Try to use ‘sudo rm file’ or change the rights of the folder with chmod.

    Thomas

  2. Jochen says

    July 29, 2014 at 14:59

    Hi Vilker,

    Add this to smb.conf:

    delete veto files = yes

    Best Regards,
    Jochen

  3. Vilker says

    April 4, 2014 at 21:16

    Hi, Leonardo

    I have a same problem, but I cant delete the Thumb.db files.
    I cant delete folders with this files, can you give me a hint?

    Ty and have a nice day!

Leave a Reply

Your email address will not be published. Required fields are marked *