Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to stop .DS_STORE files and ._ files being created in shares (SERVER SIDE)

Featured Replies

Unraid smb set to hide dot files but windows still shows them?

19 hours ago, MothyTim said:

Unraid smb set to hide dot files but windows still shows them?

 

On 6/27/2016 at 5:44 PM, John_M said:

If Samba is set up to hide the dot files but Windows is set to display them, they should appear greyed out.

To hide them completely you have to tell Windows not to display them. See the table below:

 

                              Samba hide             Samba show

Windows hide          Invisible                  Invisible

Windows show        Greyed out              Visible

 

I still maintain that I'm fundamentally opposed to the idea of configuring a file server to refuse to store certain files. It's much better to configure Macintosh clients not to create the annoying files on shared network storage in the first place. See here, for example: https://www.tekrevue.com/tip/stop-ds-store-files-mac-network/

defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE

 

Edited by John_M
Added more info

Thanks for the explanation. I have done as you suggest and told the Mac not to create them!

Cheers,

Tim

  • 8 months later...

An old thread I know but for those, like me, migrating from a Synology it might also be interesting to add @eaDir to the veto files line. So I have mine now at

 

veto files = /._*/.DS_Store/@eaDir/

  • 2 years later...

Adding

 

veto files = /._*/.DS_Store/._.DS_Store/
hide files = /._*/.DS_Store/._.DS_Store/
delete veto files = yes

to my smb-extra.conf does not give me the desired result.

I still see the files I want to hide on my array and unassigned devices.
Even after array restart and server reboot.

Any ideas why?

My smb-extra.conf looks like that:
 

#unassigned_devices_start
#Unassigned devices share includes
   include = /tmp/unassigned.devices/smb-settings.conf
#unassigned_devices_end

veto files = /._*/.DS_Store/._.DS_Store/
hide files = /._*/.DS_Store/._.DS_Store/
delete veto files = yes

[rootshare]
path = /mnt/user
comment =
browseable = yes
valid users = admin
write list = admin
vfs objects =

 

3 hours ago, derpuma said:

Adding

 

veto files = /._*/.DS_Store/._.DS_Store/
hide files = /._*/.DS_Store/._.DS_Store/
delete veto files = yes

to my smb-extra.conf does not give me the desired result.

I still see the files I want to hide on my array and unassigned devices.
Even after array restart and server reboot.

Any ideas why?

My smb-extra.conf looks like that:
 

#unassigned_devices_start
#Unassigned devices share includes
   include = /tmp/unassigned.devices/smb-settings.conf
#unassigned_devices_end

veto files = /._*/.DS_Store/._.DS_Store/
hide files = /._*/.DS_Store/._.DS_Store/
delete veto files = yes

[rootshare]
path = /mnt/user
comment =
browseable = yes
valid users = admin
write list = admin
vfs objects =

 

There is currently a bug in samba.

https://bugzilla.samba.org/show_bug.cgi?id=15143

veto files isn’t working until this bug is fixed.

24 minutes ago, wgstarks said:

There is currently a bug in samba.

https://bugzilla.samba.org/show_bug.cgi?id=15143

veto files isn’t working until this bug is fixed.


Thanks for the hint. So I guess hide files isn'T working too.
This might be also the reason for my Samba syslog errors...
 

Oct 12 13:09:49 Tower  smbd[11653]:   ===============================================================
Oct 12 13:09:49 Tower  smbd[11653]: [2022/10/12 13:09:49.358392,  0] ../../lib/util/fault.c:174(smb_panic_log)
Oct 12 13:09:49 Tower  smbd[11653]:   INTERNAL ERROR: smbd_scavenger_parent_dead in pid 11653 (4.17.0)
Oct 12 13:09:49 Tower  smbd[11653]: [2022/10/12 13:09:49.358403,  0] ../../lib/util/fault.c:178(smb_panic_log)
Oct 12 13:09:49 Tower  smbd[11653]:   If you are running a recent Samba version, and if you think this problem is not yet fixed in the latest versions, please consider reporting this bug, see https://wiki.samba.org/index.php/Bug_Reporting
Oct 12 13:09:49 Tower  smbd[11653]: [2022/10/12 13:09:49.358411,  0] ../../lib/util/fault.c:183(smb_panic_log)
Oct 12 13:09:49 Tower  smbd[11653]:   ===============================================================

 

Edited by derpuma

19 minutes ago, derpuma said:

So I guess hide files isn'T working too.

Seems a reasonable assumption but you would need to search the samba bug tracker to be sure.

  • 8 months later...

Super late to the party on this one, brand new unraid user.. trying to learn -

 

I've spent about a day on this already trawling to forums and youtube videos - and wrestling with different potential solutions...

these mac 'double files'/forks are doing my head in and make everything on the server a mess - if only there was an easy switch to hide them all in the array i think i could live - although it still feels messy knowing that they are there (granted they take up minimal space) would rather not go down the path of routinely spinning up disks to delete later.

 

I think i've now managed to get all the prevent new 'duplicate' ._filenames using the veto commands above - but i'm still getting constant .DS_Store files created when viewing from mac.  I'm also reading the bug mentioned above has now been fixed?

 

I'm also looking for a way to prevent these files ._filenames and .DS_Store files copying across when i plug in drives directly to the array as unassigned devices - I need to load something like 60TB from usb drives onto the new server.. so much faster if i can plug them in directly...  i.e 'copy the whole drive please, but ignore any file or folder starting with a '.' '?

 

any help 'dumbed down to newie level - greatly appreciated!

 

2 hours ago, wgstarks said:

I would just use the user scripts plugin to clean them up. There are several scripts for this. Here’s one-

https://forums.unraid.net/topic/39447-ds_store-cleanup-for-v6/

yeah, many thanks - i get that its a probably the ocd in me - but would rather find a way to prevent them getting on the server in the first place.. if there is one?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.