News for hackers. Stuff that matters.
Re:Apple Discontinues macOS Server by alt227 on Thursday April 21, 2022 @02:41PM (#31113556)
You hit the nail on the head. It provides a useful service to 'Mac' users. To literally every other OS user these files are considered bloat and slow the system down for everybody. Hell, linux users performing searches on these directories get duplicate results for every file a mac has touched.

I appreciate it may come across as a bit hostile towards the users, but in reality in a budget constrained environment where we cant make it perfect for everybody, we must make sacrifices to make the majority of users have a better experience. In my opinion mac users not having metadata of when a file was last modified pales in comparison to the rest of the business searches taking twice as long on samba shares.

Re:Apple Discontinues macOS Server by lilyball on Thursday April 21, 2022 @02:50PM (#31113675)
.DS_Store is one file per directory, and it's a dotfile too so it should be hidden by default from most *nix commands.
Re:Apple Discontinues macOS Server by alt227 on Thursday April 21, 2022 @02:56PM (#31113742)
Thankyou for correcting me. I was speaking from old knowledge as this was a while ago I set this up and couldnt quite remember exactly how the .DS_store system worked. I thought it was one .ds_store file per file.

That being said, depending on your business and data structure this doesnt detract from the point. Also if you have a deep nested directory structure with no real files in it, would every level contain a .ds_store file?

Re:Apple Discontinues macOS Server by tjohns on Thursday April 21, 2022 @03:26PM (#31114107)
There is one .DS_Store file per directory. It contains information like window size, icon position, folder background, thumbnails, etc. Deleting/vetoing .DS_Store files will not hurt anything of substance - other than discarding user preferences.

There are also AppleDouble (._) files, which are one-per-file. These contain the file's extended metadata and resource fork. Deleting these _may_ cause data loss if there's anything important stored in the resource fork. A better option is to enable vfs_streams on your Samba server to allow storing the additional forks natively on your filesystem (e.g. as xattrs).

(If you're using a modern Windows file server, I believe the resource fork is automatically mapped to an NTFS alternate data stream.)

See:

https://www.samba.org/samba/docs/current/man-html/vfs_stream...

https://www.samba.org/samba/docs/current/man-html/vfs_stream...

Re:Apple Discontinues macOS Server by ryandrake on Thursday April 21, 2022 @03:27PM (#31114123)
There is also the (evidently dying) principle of by default wanting control over my computer and filesystem. I know this is not compelling to most people anymore but I feel like if I want 25 files in a directory, I expect to see 25 there. Not 26 because the operating system really really really really wants to pollute it with one more file. I want 25 there. If I wanted that other file there, I would have explicitly commanded my computer to put it there.

I also object to my operating system running all these background processes on MY computer without me commanding it to, and it suggesting on its own that I do this or run that, again in absence of any command to do so. More and more, operating systems and applications are treating MY computer as a dumping ground and science experiment: for things it wants to do, instead of what I want it to do.

I should not have to go off and find a setting somewhere just to stop my operating system from doing things on its own I don’t ask for.

Re:Apple Discontinues macOS Server by tjohns on Thursday April 21, 2022 @04:00PM (#31114505)
It's an impedance mismatch. You're moving files between a system that supports multiple streams per file (data fork + resource fork) to a system that has no concept of different streams (POSIX). The extra stream has to go somewhere, or you get data loss.

It's worth noting that almost all modern file systems support multiple streams. NTFS has alternate data streams, Ext4 has xattrs. Modern SMB and NFSv4 also both support this at the protocol level.

The problem arises when you're using Samba (without vfs_streams enabled), or you're writing to a legacy FAT filesystem, in which case you start getting the AppleDouble files - again, to prevent data loss.

Re:Apple Discontinues macOS Server by pixl97 on Thursday April 21, 2022 @07:04PM (#31116249)
>but I feel like if I want 25 files in a directory, I expect to see 25 there.

What about linux that would have 27 in this case?

Re:Apple Discontinues macOS Server by kalleboo on Friday April 22, 2022 @04:56AM (#31119547)
For plenty of users "control over my filesystem" means being able to put an icon in a certain position and have it stay there when they come back to the folder.
Re:Apple Discontinues macOS Server by MrDOS on Thursday April 21, 2022 @03:22PM (#31114060)
The .DS_Store file contains macOS Finder's view preferences for the directory. Finder will only write a .DS_Store file to directories where a user has actively altered their view preferences for that directory (e.g., switched from icon to list view, “cleaned up”/rearranged icons, etc.). Just navigating through the directory doesn't create a .DS_Store file.
Re:Apple Discontinues macOS Server by amarshall on Thursday April 21, 2022 @03:04PM (#31113853)
Perhaps you were thinking of AppleDouble files.
Re:Apple Discontinues macOS Server by kaladin-jasnah on Thursday April 21, 2022 @03:29PM (#31114140)
Isn't there also the fseventsd file?
Re:Apple Discontinues macOS Server by ajcoll5 on Thursday April 21, 2022 @05:09PM (#31115222)
They also can tank SMB performance on macOS. Apple even suggests to disable them in large environments for performance.

https://support.apple.com/en-us/HT208209

Re:Apple Discontinues macOS Server by Tabular-Iceberg on Thursday April 21, 2022 @02:48PM (#31113646)
Why is it necessary to index .DS_Store files, though?

Isn’t that what’s making searches slow, not that the files exist? Why do you suppose that this isn’t a problem for Macs too?

Re:Apple Discontinues macOS Server by wyufro on Friday April 22, 2022 @08:08AM (#31120606)
I believe you're thinking of the AppleDouble files with name ._file. Those haven't really been used for the past 10 years or so (unless you run software older than that, obviously).