I am trying to back up the working files on my Macintosh to a NAS server. The server runs FreeNAS 11.3. I mount the server over AFP (Apple Filing Protocol). The server runs Netatalk software which provides AFP.
Some of the files I backed up had a special group membership,
However, group
Why does the Mac say "Operation not permitted" when I chown a file on FreeNAS mounted via AFP? How can I make this chown operation succeed?
My underlying goal is to be able to back up all files on my Mac to the FreeNAS server via rsync. Rsync is able to copy the file data and some metadata, but it is unable to correct the group membership of the files on the server. I imagine that if I can't change group membership myself from the shell, then I can't expect rsync to succeed either. Thus, I want to fix my inability to change group from the shell first.
N.B. My FreeNAS version is FreeNAS-11.3-U4.1, which dates from 2020. Yes, it is out of date. I will upgrade my server to the latest version someday. I am skeptical that upgrading will solve this problem, but we shall see. The hardware is a FreeNAS mini-E box from ixSystems.
macOS version is 10.14.6 Mojave.
Netatalk version on FreeNAS is 3.1.12.
I understand that Apple prefers SMB over AFP these days. However, I see the same symptoms when I connect from this Mac to this server via SMB as I do via AFP. If I can limit the scope of this diagnosis to AFP, I'd prefer that. If the solution does not also cure the symptoms when connecting via SMB, I will open a new forum thread for SMB.
Some of the files I backed up had a special group membership,
xampp
, on my Mac. On the AFP volume, their group membership is the default staff
, as seen from the Mac shell. So I tried to correct their group membership manually. It failed, with the error message, "chown: Operation not permitted".Code:
% sudo chown :xampp /Volumes/FreeNAS-vol/a/b/c/doc.mp4 chown: /Volumes/FreeNAS-vol/a/b/c/doc.mp4: Operation not permitted
However, group
xampp
exists on the FreeNAS server. When I connect to a shell on that server via ssh, I am able to perform this chown with no problem. Why does the Mac say "Operation not permitted" when I chown a file on FreeNAS mounted via AFP? How can I make this chown operation succeed?
My underlying goal is to be able to back up all files on my Mac to the FreeNAS server via rsync. Rsync is able to copy the file data and some metadata, but it is unable to correct the group membership of the files on the server. I imagine that if I can't change group membership myself from the shell, then I can't expect rsync to succeed either. Thus, I want to fix my inability to change group from the shell first.
N.B. My FreeNAS version is FreeNAS-11.3-U4.1, which dates from 2020. Yes, it is out of date. I will upgrade my server to the latest version someday. I am skeptical that upgrading will solve this problem, but we shall see. The hardware is a FreeNAS mini-E box from ixSystems.
macOS version is 10.14.6 Mojave.
Netatalk version on FreeNAS is 3.1.12.
Code:
% netatalk-config --version 3.1.12
I understand that Apple prefers SMB over AFP these days. However, I see the same symptoms when I connect from this Mac to this server via SMB as I do via AFP. If I can limit the scope of this diagnosis to AFP, I'd prefer that. If the solution does not also cure the symptoms when connecting via SMB, I will open a new forum thread for SMB.