November 19, 20196 yr 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.
November 19, 20196 yr You can configure macOS not to store those files on network attached storage with defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
November 19, 20196 yr I believe the user scripts plugin also includes a script for cleaning out these files.
November 20, 20196 yr BlueHarvest is absolutely brilliant at that: http://www.zeroonetwenty.com/blueharvest/
November 20, 20196 yr 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.
November 20, 20196 yr 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.
November 20, 20196 yr 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 "{}" \;
November 20, 20196 yr 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.
November 20, 20196 yr Thanks @wgstarks. I think for my purposes I'll remove the /boot lines and let it run on /mnt/user.
November 20, 20196 yr 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
November 22, 20196 yr 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.
November 22, 20196 yr 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.