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.

Apple Crapintosh computer leaving trash all over my Unraid shares!

Featured Replies

I'm wondering if there's any way from the Unraid side to prevent the creation of .DS_Store and (sometimes hundreds) of ._FILENAME files in every.single.directory the Mac connects to?  These files are not visible when browsing from the Mac itself using Finder, but they are visible and causing problems for non-Mac devices which also need to access these shares.

 

Many thanks.

You can configure macOS not to store those files on network attached storage with

defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true

 

I believe the user scripts plugin also includes a script for cleaning out these files.

On 11/19/2019 at 9:54 AM, wgstarks said:

I believe the user scripts plugin also includes a script for cleaning out these files.

It removes .DS_Store, but does not remove the ._.DS_Store or other ._. metadata files :/

 

I'm going to check the plugin thread for info on the other metadata files MacOS leaves.

17 minutes ago, autumnwalker said:

It removes .DS_Store, but does not remove the ._.DS_Store or other ._. metadata files :/

 

I'm going to check the plugin thread for info on the other metadata files MacOS leaves.

It’s pretty easily modified to include those files. I can post the script I use later if you want to see an example.

2 minutes ago, wgstarks said:

It’s pretty easily modified to include those files. I can post the script I use later if you want to see an example.

That would be great @wgstarks! Thank you.

 

This is the most recent script showing in the support thread, but it does not appear to get any of the ._randomdocument.ext stuff.

#!/bin/bash
echo "This may take a while"
 
echo "Searching for (and deleting) Apple Netatalk Files/Directories"
find /mnt/user -maxdepth 9999 -noleaf \( -type f \( -name ".DS_Store" -o -name "._.DS_Store" \) -o -type d \( -name ".AppleDB" -o -name ".AppleDesktop" -o -name ".AppleDouble" -o -name ".TemporaryItems" \) \) -exec rm -r "{}" \;

 

Here is the same basic script slightly modified-

#!/bin/bash
echo "Searching for (and deleting) .DS_Store Files in Media and flash"
echo "This may take a awhile"
find /mnt/user/Media -maxdepth 9999 -noleaf -type f -name ".DS_Store" -exec rm "{}" \;
find /boot -maxdepth 9999 -noleaf -type f -name ".DS_Store" -exec rm "{}" \;

echo "======================="
echo "Searching for (and deleting) ._ files in Media and flash"
find /mnt/user/Media -maxdepth 9999 -noleaf -type f -name "._*" -exec rm '{}' \;
find /boot -maxdepth 9999 -noleaf -type f -name "._*" -exec rm '{}' \;
echo "Cleanup Complete"

This script is set to clean my “Media” share but you can change the path to /mnt/user to do a more general cleaning. The script will remove .DS_Store files and any file with a name beginning with “._”. I think that should get all the files you need but you can modify it to get other file names if needed. Be sure you don't have any files you want to keep that fall into these categories though. You won't be able to undo this.

Thanks @wgstarks. I think for my purposes I'll remove the /boot lines and let it run on /mnt/user.

In this video spaceinvaderone addresses this issue and how to prevent it

 

If you want Unraid itself to prevent these files from being created:

1. Stop array
2. Go to SMB Settings and add this to SMB Extra Configuration

 

veto files = /._*/.DS_Store/.AppleDouble/.Trashes/.TemporaryItems/.Spotlight-V100/
delete veto files = yes

 

  • Author
On 11/20/2019 at 10:49 PM, SnickySnacks said:

If you want Unraid itself to prevent these files from being created:

1. Stop array
2. Go to SMB Settings and add this to SMB Extra Configuration

 


veto files = /._*/.DS_Store/.AppleDouble/.Trashes/.TemporaryItems/.Spotlight-V100/
delete veto files = yes

 

Looks like we have a winner.  Thanks for all the helpful suggestions, you guys rock.

It's my preference to stop them on Unraid since I don't have to manage individual computers (or guests!).

If you notice any new files that need to be added to the veto list, please let the community know.
At this point my shares are all read-only as a ransomware preventative measure except for 1 share that I stage files to, so nothing can really make files in the array anymore anyways.

Archived

This topic is now archived and is closed to further replies.

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.