Disabling DS_Store System Wide

ts85
New Contributor III

We have a handful of edit stations, we tend to run into permissions error as an editor will drag an entire folder from their desktop to an smb / omfs share. I'd like to disable DS_Store on a scope of stations.

I was experimenting with the "Custom Settings" section of the JSS. I wrote the following:

defaults write com.apple.desktopservices DSDontWriteNetworkStores true

cp'd that to the desktop and used plutil to convert to XML. Uploaded to Custom Settings and scoped to a test machine. It completed the push, however when rebooting / logging in and out I noticed that plist hasn't been written anywhere and I still show .DS_Store files in each directory.

f83075919b8f4b83939acca34afad888

Is it better to defaults write /Library/Preferences as opposed to the user library to apply to any account?

6 REPLIES 6

bpavlov
Honored Contributor

Just to make sure, the plist looks like this right:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>DSDontWriteNetworkStores</key>
    <string>true</string>
</dict>
</plist>

Also, that would only effect network volumes. Once created, that configuration profile would need to be on all computers that access that network share because otherwise you will end up in a situation where some computers have preference and others don't. And the ones that don't have it will continue to write the .DS_Store files on network volumes. Config profiles will not write plist files on the computer so it won't be visible in that regard. But you can check that the config profile is installed by using the "profiles" command (do "man profiles" in Terminal for more info) or check System Preferences -> Profiles. The latter will be the easiest to confirm that it's taking effect.

ts85
New Contributor III

Yes, my plist looks like the above.

I confirmed it's there via System Preferences > Profiles

ba927977d4514e3298918840c57b83df

I logged out and back in, yet still am showing .DS_Store files on Desktop, I am assuming disabling DS_Store isn't retroactive as when I create a new folder it does not contain a DS_Store file?

mpermann
Valued Contributor II

@drew.diver based on what @bpavlov wrote turning off the .DS_Store file using the profile only affects network shares and not the local drive. Are you using network accounts? Maybe he can confirm that. I've not tried it myself.

ts85
New Contributor III

Ah, editors login via AD credentials so they also have a user account generated locally under /Users. They drag the project locally, work throughout the day and at the end of the day move back to the server under a "Current" folder. Would it be best to have the defaults command as a one time login script that's ran each time a new user signs in?

bpavlov
Honored Contributor

No need to use the defaults command. That particular preference effects NETWORK VOLUMES. The problem there is simply that your end users are grabbing files from their local computer (which the config profile will not effect) and putting it on a network volume (which is what the config profile and that preference does effect). In copying folders over they are also copying the invisible .DS_Store files with it as well. In other words, you need to tell your users to stop working locally or have something run on the server side that deletes any .DS_Store files it finds on the network volume.

However, just taking a step back, I don't believe DS_Store files should effect permissions. Would that be more related to POSIX and/or ACLs setup on the network shares?

scottb
Honored Contributor

We used to use this piece of software in our mastering studio's Macs.
BlueHarvest
Customizable and easy for them to use.