Automount SMB permissions on Sonoma 14.0

Once again a MacOS upgrade breaks automount. I had a properly configured and working automount for an SMB filesystem with read-write permissions. Now, with the Sonoma upgrade all permissions for my automount directories are 700 drwx------ 1 root   wheel in /System/Volumes/Data/.


/etc/auto_master has one added line, which is overwritten with almost any OS update:

/- auto_shares


/etc/auto_shares includes:

/System/Volumes/Data/Shares/media -fstype=smbfs,soft,noowners,nosuid,rw ://<uid>:<pwd>@<hostname>/share/media

/System/Volumes/Data/Shares/repo -fstype=smbfs,soft,noowners,nosuid,rw ://<uid>:<pwd>@<hostname>/share/repo

/System/Volumes/Data/Shares/public -fstype=smbfs,soft,noowners,nosuid,rw ://<uid>:<pwd>@<hostname>/share/public

/System/Volumes/Data/Shares/downloads -fstype=smbfs,soft,noowners,nosuid,rw ://<uid>:<pwd>@<hostname>/share/downloads


The fstype parameters of "rw" appear to be ignored by the OS and I can't seem to change them with chmod.


The Samba server is Ubuntu 18.x

Posted on Oct 14, 2023 8:46 AM

Reply
3 replies

Jan 20, 2024 6:24 PM in response to markbsigler

20 Jan 2024

I have used autofs / automount rather successfully for several years to mount SMB shares. I can help out here at least with regard to Apple's standard overwrite of /etc/auto_master with every update. Those familiar with UNIX will have learned to rely on soft links for things like configuration files that can change. Herewith my simple steps:

  1. After editing the /etc/auto_master file as you wish (viz., with your /- auto_shares line), *rename* that file as something unique to you, e.g. "/etc/auto_master_sambashares".
  2. Now create a soft link (symlink) to that file:

"sudo ln -s /etc/auto_master_sambashares /etc/auto_master" (you'll need root permissions to write to that directory). Note that you cannot keep any file with the exact name "auto_master" in that directory -- that's why you rename the original.


3.. Now every time your OS updates, you'll only have to take two steps: a) rename or delete the new/updated "/etc/auto_master" file, then b) recreate the symlink as in 2. -- your own modified "auto_master_sambashares" file will not have been touched, it'll still be there. Finally, you'll need to issue an automount refresh: "sudo automount -vc"


Samba server: Synology 716+...



May 21, 2024 5:14 AM in response to markbsigler

Did you ever find an answer to this?


Sonoma has killed our CI process because it keeps remounting the shares are read only, apparently randomly. We have made a script on the desktop which does an unmount/remount which fixes is temporarily, but that needs a password so can't be automated.. I've frequently had it that I'll make a build and literally 10 minutes later the share is read only again.


This has been working for fine through multiple versions, but somoma as far as I can tell no longer supports 'rw'.. so the owner *matters* and the system keeps trying to change that back to root.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Automount SMB permissions on Sonoma 14.0

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.