diskutil verifyPermissions /Volumes/SeldonTo then run a Repair Disk Permissions on that same volume, you would use:
diskutil repairPermissions /Volumes/SeldonIn most cases, repairPermissions is done to the currently booted volume. To find this volume, you can use the bless command along with the –getBoot option. For example:
bless –getBootBless will then respond with the device that comprises your boot volume. To convert this into a path that can be used with diskutil, you would use the diskutil command followed by info followed by the output of the bless command. For example, if the device were /dev/disk0s2 then you would run the following:
diskutil info /dev/disk0s2You could then script a repair permission of the boot volume using the following, which would also dump the output into a log file:
declare tmp=/disk declare boot=/disk bless –getBoot > $tmp mkdir /var/log/318 diskutil info $tmp | grep “Media Name:” | cut -c 30-100 > $boot /usr/sbin/diskutil repairPermissions $boot >> /var/log/318/fixperm.log echo “Repair Permisssions completed at `date` >> /var/log/318/fixperm.logPlacing this script into a package would then allow for sending a Repair Disk Permissions command to client computers though, let’s say, ARD or even allow a user to run it themselves using the JAMF self-service client. All without having to leave ones chair or provide an administrative password to a user (having said this the script will require local administrative privileges).
krypted February 28th, 2010