MacOS – OS X Server – Reset all POSIX and ACLs on new file share

file-sharingmacososx-serverserver.app

I've just set up a new mini running OS X Yosemite/Server 4, and am using a Drobo 5D for file storage. All of the files on the Drobo have been copied from an old Xserve setup and various external drives and at least one other Mac's user folder.

I have my own admin account on the mini, then a small handful of users with local accounts on the mini (added through the Users panel) in a single Group which I've given access to the fileshare. Eventually there will be two Groups, one for administrative stuff that will be in a separate folder that the other users can't access. So, fairly simple.

Is there a proper way in Server to reset all ownership and permissions for the entire fileshare? I'd like to start with the cleanest slate possible. I'm comfortable with the usual simple Linux chmod/chown commands but completely unfamiliar with the ACL and umask and what not, but am not afraid to cut and paste into Terminal. 🙂 Basically I'd want to be sure to wipe out any old ownerships or other stuff from other machines, and make sure everything is set up so we don't run into any problems down the line with new files or modifying old ones.

Thanks in advance!

Best Answer

I use the GUI, it easier... When I migrate a server, I:

  1. Add the shares to the 'File Sharing' section of the server app.
  2. Configure the permissions as I would like them to be.
  3. Navigate to your server under the 'Server' section on the left of the server app, select 'Storage' from the tabs and then navigate to where your share is located and select it.
  4. Click on the 'Gear' at the bottom of the page and select 'Edit permissions' and check that they look right, i.e. remove any inherited ones and ensure the correct users / groups have the correct permissions. Then click 'Ok'
  5. Click the 'Gear' again and this time select 'Propagate permissions' and select all options and click 'Ok'. This might take a while(30 minutes or more, depending in the size of the share), you need to wait.

Notes: Sometimes I use 'Batchmod' ( get from Internet Archive now; the original site no longer works: http://www.lagentesoft.com/batchmod/ ) or chmod, chgrp, chown if I am having trouble changing the file ownership before the above steps, it's not always necessary.