Access to /System/Volumes/Data denied for some services
I have a need to keep a number of NFS drives mounted 24/7 on a headless macmini running Big Sur (11.5.2 at the time of writing). To do this I created the mounts in the writable filesystem at
/System/Volumes/Data/mnt/nfsdrive1
/System/Volumes/Data/mnt/nfsdrive2
etc.
This works great for most things but I'm having issues accessing the files in the drives from certain processes.
For example, if I SSH in to that machine as myself I can not access these files.
Another example, I have some bash scripts which create tar backups and tar gives me errors that it can't stat files in that location when they are kicked off automatically (they run fine when I run the scripts manually in the command line).
Here is some relevant debug info
content of /private/etc/auto_master
/- auto_nfs -nobrowse,nosuid
Content of /private/etc/auto_nfs
/System/Volumes/Data/mnt/nfsdrive1 -fstype=nfs,bg,intr,noowners,rw,vers=4 nfs://10.0.0.6:/volume1/drive1
/System/Volumes/Data/mnt/nfsdrive2 -fstype=nfs,bg,intr,noowners,rw,vers=4 nfs://10.0.0.6:/volume1/drive2
...
I can confirm it's not a user/group permission problem since I can access all these files as myself when using this computer directly
How can I grant access to these files to all processes and users on the machine?
Mac mini 2018 or later