1

I am using NixOS 24.11 and the path of the SMB share is an SSHFS mount point.

The following configuration works, I can connect, create, modify, and delete files, but the share does not appear as a valid Time Machine destination.

services.samba = {
    enable = true;
    openFirewall = false; # use TailScale to connect
    settings = {
      global = {
        "workgroup" = "WORKGROUP";
        "server string" = "<server_name>";
        "netbios name" = "<server_name>";
        "security" = "user";
        "protocol" = "SMB3";
      };
      "timemachine" = {
        "path" = "/path/to/temp_timemachine_test";
        "valid users" = "ferdia";
        "read only" = "no";
      };
    };
  };

on macOS the mounted SMB volume has the following permissions:

/V/timemachine $ ls -l
.rwx------  0 ferdiamckeogh 17 Jan 11:12 4913
.rwx------  0 ferdiamckeogh 17 Jan 11:14 DJI_20250115152449_0008_D_001.MP4
drwx------  - ferdiamckeogh 16 Jan 17:55 'Ferdia’s MacBook Air 2025-01-16-173138.incomplete'
.rwx------@ 0 ferdiamckeogh 17 Jan 11:10 scratch.py
.rwx------  5 ferdiamckeogh 17 Jan 11:12 testfile
.rwx------  0 ferdiamckeogh 17 Jan 11:12 testfile~

If I use the following configuration:

services.samba = {
    enable = true;
    openFirewall = false; # use TailScale to connect
    settings = {
      global = {
        "workgroup" = "WORKGROUP";
        "server string" = "<server_name>";
        "netbios name" = "<server_name>";
        "security" = "user";
        "protocol" = "SMB3";
      };
      "timemachine" = {
        "path" = "/path/to/temp_timemachine_test";
        "valid users" = "ferdia";
        "read only" = "no";
        "fruit:aapl" = "yes";
        "fruit:time machine" = "yes";
        "vfs objects" = "catia fruit streams_xattr";
      };
    };
  };

It appears as a valid Time Machine destination, but I can no longer delete files. touch testfile works, and I can edit testfile with Vim (creating many temporary files that are not cleaned up), but rm fails with rm: testfile: Operation not supported.

Attempting to copy a file from Finder by dragging gives this error: The operation can’t be completed because an unexpected error occurred (error code -50)..

The SSHFS volume being shared is mounted with idmap=user and my Linux account's UID and GID, which I can see with ls -l, showing me as the owner of the directory and its contents.

On macOS my local account is the owner of the mounted SMB volume:

/Volumes/timemachine $ ls -l
.rw-r--r-- 0 ferdiamckeogh 17 Jan 11:12 4913
.rw-r--r-- 0 ferdiamckeogh 17 Jan 11:14 DJI_20250115152449_0008_D_001.MP4
drwxr-xr-x - ferdiamckeogh 16 Jan 17:55 'Ferdia’s MacBook Air 2025-01-16-173138.incomplete'
.rw-r--r-- 0 ferdiamckeogh 17 Jan 11:10 scratch.py
.rw-r--r-- 5 ferdiamckeogh 17 Jan 11:12 testfile
.rw-r--r-- 0 ferdiamckeogh 17 Jan 11:12 testfile~

So I can see I've lost execute permissions (should that matter?), and group/others have gained read permissions, why did enabling the Time Machine SMB options do that?

What is incorrect about my configuration?

1 Answers1

0

SSHFS does not support extended attributes, and streams_xattr requires support from the underlying filesystem. Removing this from vfs objects fixes the permissions issue, and appears to complete a Time Machine backup. But fruit depends on streams_xattr so I don't believe this is a good solution; it may break.

Edit: I switched to Netatalk, much better performance and no extended attribute issues.