Finder ignoring com.apple.desktopservices setting

I have the Subject defaults setting set to DSDontWriteNetworkStores = 1, which should mean that no ._ files are created on the Samba share that I have connected to on my iMac. However, as of Ventura, whenever I use Finder to copy files to the Samba share then ._ files are being created. This did not happen on the same share when using prior versions of Mac OS X. Also, if I use scp or sftp from the iMac to the Samba share then no ._ files are created either.


I have reported this before but I got just <crickets> . Am I the only one seeing this?

iMac 21.5″

Posted on Jul 8, 2023 7:21 AM

Reply
Question marked as Top-ranking reply

Posted on Jul 17, 2023 4:10 AM

Barney-15E wrote:

As far as I know, that preference setting will only prevent writing the Desktop Services Store (.DS_Store). It doesn't prevent splitting off the metadata into ._ files.
There used to be a program called BlueHarvest that prevented writing the metadata files.
If you have control of the Samba server, look into veto files. You may be able to stop them from that end.

I am pretty sure (80%?) that I just had to use the defaults setting and no ._* files were ever created. And I have loads of files on my SMB server's shares with dates showing they were copied prior to Ventura.


Interestingly I decided to ask ChatGPT and Bard. And interestingly, they gave different answers. Bard is telling me that the defaults setting can prevent these files being created by Finder. However, ChatGPT tells me the following:


To prevent the creation of .DS_Store and ._* files by Finder on SMB shares mounted on a Mac running macOS Ventura, you can follow these steps:

      1. Open Terminal: You can find Terminal in the Utilities folder within the Applications folder, or you can use Spotlight search by pressing Command + Space and typing "Terminal."
      2. Enter the following command to create a global configuration file for the SMB client:


sudo nano /etc/nsmb.conf

This command opens the Nano text editor with administrative privileges.

      1. If the file is empty, start by adding the following lines:
[default] 
smb_neg=smb3_only 
file_ids_off=yes 
dir_ids_off=yes 
streams=no
      1. Press Control + O to save the changes, and then press Control + X to exit Nano.
      2. Restart the SMB client by entering the following command:


sudo killall -HUP smbd


This command refreshes the SMB client and loads the new configuration.

With these steps, you've configured the SMB client to prevent the creation of .DS_Store files and ._* files on SMB shares. The streams option disables the creation of alternate data streams, which are used for resource forks on SMB shares. Additionally, the smb_neg, file_ids_off, and dir_ids_off options help optimize compatibility with certain SMB servers.

It's important to note that these changes will affect all SMB shares on your Mac. If you want to revert them or customize the configuration for specific shares, you can modify the /etc/nsmb.conf file accordingly.


I've now applied the ChatGPT suggested solution and that is working.



Similar questions

4 replies
Question marked as Top-ranking reply

Jul 17, 2023 4:10 AM in response to Barney-15E

Barney-15E wrote:

As far as I know, that preference setting will only prevent writing the Desktop Services Store (.DS_Store). It doesn't prevent splitting off the metadata into ._ files.
There used to be a program called BlueHarvest that prevented writing the metadata files.
If you have control of the Samba server, look into veto files. You may be able to stop them from that end.

I am pretty sure (80%?) that I just had to use the defaults setting and no ._* files were ever created. And I have loads of files on my SMB server's shares with dates showing they were copied prior to Ventura.


Interestingly I decided to ask ChatGPT and Bard. And interestingly, they gave different answers. Bard is telling me that the defaults setting can prevent these files being created by Finder. However, ChatGPT tells me the following:


To prevent the creation of .DS_Store and ._* files by Finder on SMB shares mounted on a Mac running macOS Ventura, you can follow these steps:

      1. Open Terminal: You can find Terminal in the Utilities folder within the Applications folder, or you can use Spotlight search by pressing Command + Space and typing "Terminal."
      2. Enter the following command to create a global configuration file for the SMB client:


sudo nano /etc/nsmb.conf

This command opens the Nano text editor with administrative privileges.

      1. If the file is empty, start by adding the following lines:
[default] 
smb_neg=smb3_only 
file_ids_off=yes 
dir_ids_off=yes 
streams=no
      1. Press Control + O to save the changes, and then press Control + X to exit Nano.
      2. Restart the SMB client by entering the following command:


sudo killall -HUP smbd


This command refreshes the SMB client and loads the new configuration.

With these steps, you've configured the SMB client to prevent the creation of .DS_Store files and ._* files on SMB shares. The streams option disables the creation of alternate data streams, which are used for resource forks on SMB shares. Additionally, the smb_neg, file_ids_off, and dir_ids_off options help optimize compatibility with certain SMB servers.

It's important to note that these changes will affect all SMB shares on your Mac. If you want to revert them or customize the configuration for specific shares, you can modify the /etc/nsmb.conf file accordingly.


I've now applied the ChatGPT suggested solution and that is working.



Jul 10, 2023 6:51 PM in response to ksaro1

As far as I know, that preference setting will only prevent writing the Desktop Services Store (.DS_Store). It doesn't prevent splitting off the metadata into ._ files.

There used to be a program called BlueHarvest that prevented writing the metadata files.

If you have control of the Samba server, look into veto files. You may be able to stop them from that end.

Jul 17, 2023 5:56 AM in response to ksaro1

Correction - the ChatGPT suggestion did not work. I've reverted to the veto files on the Samba server's configuration.


Also, I've now realised what I've been seeing in the past. My one home Samba server (Raspberry PI 4) also serves its USB drives via AFP. And it's the AFP share that I've been using in Finder. In my Ventura update process, I must have replaced the AFP share with the SMB share of the same USB disks. This is where the ._* files have come from. So, on an AFP share no ._* files are created by Finder and on the SMB share of the same disks, the ._* files are created by Finder.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Finder ignoring com.apple.desktopservices setting

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.