Repair disk permissions with applescript

Discussion in 'Mac Programming' started by 1theo0, Nov 17, 2012.

  1. macrumors newbie


    Jul 21, 2012
    Hello! I want to write an applescript to repair the disk permissions each 2 months. I'll save it as an app and open it with iCal, but I need someone to check if my code is ok so that I don't screw up. Thanks! ;)
  2. macrumors 6502

    May 29, 2011
    Littleton, Colorado, USA
    Unless you are having a specific permissions issue, there is no need to repair disk permissions - especially since it does nothing in a user account or for items that were not installed by an Apple installer utility (e.g. dragged from a disk image).
  3. thread starter macrumors newbie


    Jul 21, 2012
    I am constantly improving a theme (hence changing files in /System/Library/PrivateFrameworks/CoreUI) and want to make sure everything's all right...;) I don't want to see the prohibitory sign on boot again- once was enough :eek: :D
  4. macrumors regular

    Jan 14, 2011
    Swimming In Tsunami

    why not use bash script. Here mine I have on my Flash Utility Boot Disk.

    I named it .drepair and placed it in $HOME

    echo "Enter Password"
    # Ask for the administrator password upfront
    sudo v
    # Repair Disk Permissions 
    diskutil repairPermissions /
    # Update share Cache
    sudo update_dyld_shared_cache -force
    sudo shutdown -r +.10

Share This Page