1

I just got a new NAS (Synology DS923+), and my Mac was able to see it and write data to it right away. The Mac is running Ventura 13.0.

I do most of my work from the command line in a Terminal window. I have two problems when copying files to the NAS:

  1. file modification times are not preserved
  2. file permissions all show as rwxrwxrwx (mode 666).

These problems show up both when copying files using cp -p, and extracting tarballs with tar x. (Oddly, some ways of propagating modtimes to files on the NAS, such as touch -r, do work.)

I believe problem #1 is probably related to https://discussions.apple.com/thread/6681949, although if (as suggested in that thread) it has something to do with a bug in MacOS, I'm surprised it still hasn't been fixed.

I believe problem #2 is a limitation of SMB.

So my main question is, is there a better way of mounting a fileshare from MacOS than SMB? I believe I've got all protocols enabled on the NAS, although it has a note saying that MacOS does not support AFP after Mojave.

I'm not even sure I'm using SMB. Finder lists the shared folder as type "Sharepoint". And the actual low-level mount (as reported by df) is //user@host._afpovertcp._tcp.local/folder, which kind of suggests AFP might be involved after all. [Addendum: It turns out I was using AFP. See the answer I just posted.]

If there's a better or at least a different way, how do I request it? For example, I'm pretty sure MacOS can do NFS, and obviously the NAS can, too. (I know NFS has some disadvantages, but if it'd get me modes and mtimes, I'd probably be willing to put up with lesser inconveniences.)

2 Answers 2

4

This isn't intended as a full answer, but more of a "stepping stone" to help you along - or at least share some of my experience in using Synology's quirky NAS with Apple's quirky macOS.

First, I feel that most of the issues encountered in using macOS with Synology are due to the extremely poor documentation on both systems. So don't feel bad, it's no fault of yours really. If you've played around any with the Synology configuration interface, you are aware that it offers alternatives to SMB/CIFS. After talking to Synology support staff, it's unclear to me whether any of them are well-implemented, and certainly not well-documented (applies to Apple's hardware also). And so, since I had more experience with SMB/CIFS, I decided to stick with that.

In my usage, I've found that things seem to work more reliably when I use Apple's AutoFS feature to manage the connection between my macOS and the Synology. There are some details on how to set this up in a related Q&A here.

WRT your problems on file modification times & permissions:

  1. I've not seen any issues with file modification times, but you should check your Synology interface to ensure that your time is set correctly, and you have specified a connection with a reliable NTP server.

  2. Permissions are a bit puzzling still. I think this has to do with the fact that Synology uses the btrfs filesystem while Apple of course uses APFS (or one of its other proprietary file systems). In my case, I've mostly overcome the permissions issue by using rsync with explicitly-specified permissions for most of my writes to the Synology. IIRC, you can manually specify permissions when using cp.

That's all I'll say for now, except that the Mac-Synology marriage is working for me currently, but it hasn't been without spending huge amounts of time and experiments (due to no good documentation). You'll likely have more questions; my advice would be to ask specific questions.

4
  • Thanks for your answer. The time on the NAS is set correctly, although I don't believe that would have anything to do with my modtime problem. My problem is that when a program tries to set the modtime of a file to something other than the current time, it doesn't always work. Commented Aug 20, 2023 at 12:59
  • And, I think you're right. I thought this question was specific enough, but clearly it's not. I'll try asking two more-specific questions, one on the modtime problem, one on the permissions problem. Commented Aug 20, 2023 at 13:00
  • ...and I've just discovered that almost everything in my question was wrong! See the answer I just posted. Commented Aug 20, 2023 at 13:59
  • @SteveSummit: Glad my rather vague answer helped you a bit. WRT "when a program tries to set the modtime of a file to something other than the current time, it doesn't always work": You didn't say how you were attempting to set the modtime, but I suspect that this is another of those things that falls through the cracks of the diffs between Apple's APFS (proprietary) and btrfs... this is part of why one spends inordinate amounts of time futzing over small-ish issues (but small-ish is not the same as unimportant obviously).
    – Seamus
    Commented Aug 20, 2023 at 18:14
2

So it turns out the premise of my question was wrong. I was pretty sure I was connecting via SMB, but in fact I was connecting via AFP.

According to Synology's knowledge base, "Starting from macOS 11.0 Big Sur, Apple no longer supports AFP servers." But this is either incorrect or misleading, because it turned out that my Mac (running Ventura 13.0) was connecting using AFP.

When I disabled AFP, and reconnected (now definitely using SMB), my modtime-preservation problem went away.

My file-mode problem persists (with different symptoms) under SMB, but I think I'll ask a separate question about that.

The other part of my question concerned the possibility of using NFS as an alternative. I did figure out how to do that, by invoking

sudo mount -t nfs -o resvport 192.168.1.3:/volume1/share /Volumes/nfs/share

from the command line. (I don't remember why or whether the resvport option was important.) This did fix both the modtime-preservation and file-mode problems, but it's a nuisance to invoke, and it seemed (in one test, at least) to be about 35% slower.

1
  • "Apple no longer supports AFP servers." But this is either incorrect or misleading,"... ha ha - yes, much of the documentation is like this. It's led me to wonder if Synology is a branch of Apple - or at least disciples of Apple's dismal documentation habits.
    – Seamus
    Commented Aug 20, 2023 at 18:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .