How often do you repair permissons?

Discussion in 'Mac Apps and Mac App Store' started by EGT, Jul 26, 2004.

  1. EGT macrumors 68000

    EGT

    Joined:
    Sep 4, 2003
    #1
    Do you repair permissons every time you install/uninstall software, or leave to a weekly or monthly thing?

    What exactly does repairing permissons do? I'm a bit confused by it all.

    Thanks
     
  2. Diatribe macrumors 601

    Diatribe

    Joined:
    Jan 8, 2004
    Location:
    Back in the motherland
    #2
    I repair permissions about once a month. If I install a big program I do it afterwards too. But usually only one or two permissions are faulty.

    As to what it does exactly... I could give you some real unscientific, stupid sounding but easy to understand explanation or I could just leave it to someone who understands what the hell they're talking about. :D
    I'll just choose the latter. ;)
     
  3. Jo-Kun macrumors 6502a

    Joined:
    Dec 20, 2003
    Location:
    Antwerp-Belgium
    #3
    I never repair permissions... maybe I'm stupid... but it all sound so weird... I don't know what the (dis)advantage is... so I don't do **** with it... and all works fine...
     
  4. Diatribe macrumors 601

    Diatribe

    Joined:
    Jan 8, 2004
    Location:
    Back in the motherland
    #4
    Disadvantages can be crashing programs, worse performance of the OS or the OS crashing itself, IF there are faulty permissions AND they interfere with sth. critical.
     
  5. clcnyc macrumors regular

    clcnyc

    Joined:
    Jan 6, 2004
    Location:
    NYC
    #5
    once every monday, and whenever I install or update a new application.
     
  6. jsw Moderator emeritus

    jsw

    Joined:
    Mar 16, 2004
    Location:
    Andover, MA
    #6
    Once every week or so, I run the following script:

    echo "Performing daily maintenance..."
    sudo periodic daily
    echo "Performing weekly maintenance..."
    sudo periodic weekly
    echo "Performing monthly maintenance..."
    sudo periodic monthly
    echo "Repairing permissions..."
    sudo diskutil repairPermissions /
    echo "Updating prebinding..."
    sudo update_prebinding -root / -force
    echo "Done!"

    which I've named 'maint' and made executable. Keeps my old PB, which isn't on all the time, in tip-top shape. I also run in on my G5, which usually is[/] on, if it's skipped on of it's scheduled maintenance scripts due to a power outage, etc.
     
  7. Abstract macrumors Penryn

    Abstract

    Joined:
    Dec 27, 2002
    Location:
    Location Location Location
    #7
    So if I copy and paste that into (where?), then it would do it without going to Disk Utility? Would it repair permissions once a day/week/month automatically, because that wouldn't be what I want.

    Anyway, I repair disk permissions every time I install an application, so I rarely ever do. :)
     
  8. dvdh macrumors 6502

    dvdh

    Joined:
    Apr 6, 2004
    #8
    About once every two weeks, along with optimizing the system and cleaning up the logs and caches. (using Onyx) . . . so far running smooth. (after 1.25 years, original OS install)
     
  9. jsw Moderator emeritus

    jsw

    Joined:
    Mar 16, 2004
    Location:
    Andover, MA
    #9
    Open up Applications->Utilities->Terminal. This will open a terminal in your home account.

    Type 'touch maint' [the part between the single quotes] at the prompt, and hit return (don't mean to offend if I'm over-simplifying for you - but maybe someone else will read this and need the details). The 'maint' part is the name of the script you'll be creating - you can call it whatever you want; I just call it 'maint'.

    Now, in Finder, navigate to your home directory, find the file you just created ('maint' inthe above example) and right (or control) click on it to "Open With..." TextEdit. In TextEdit, cut the script above and paste it into the file.

    Since each command is preceded by an echo statement saying what its going to do, you can feel free to cut out stuff you don't want. In other words, if all you want to do is repair permissions, just leave in that part - although it's as easy to use Disk Utility as it is to run a one-line script. Of course, if you Google 'cron OS X' you'll find tips on how to alter your cron table (which runs stuff automatically at specified times) and, say, repair permissions once a day by running this script you just created.

    Then save the file from TextEdit.

    Back in the terminal window, type in 'chmod u=rwx maint' and hit return. Of course, replace 'maint' with your name if you've called it something else. This command allows you to execute the script (run it).

    To run the script, simply open Terminal at any point, go to your home directory (which is where Terminal opens to by default, so you only need to go there if you've gone elsewhere in a Terminal window) and type './maint' and hit return.

    Note: if you update the pre-binding, it's a very good idea to restart the system afterwards.
     
  10. Jovian9 macrumors 68000

    Jovian9

    Joined:
    Feb 19, 2003
    Location:
    Planet Zebes
    #10
    3X a week. But I use a program called Cronnix and it does it for me at a specified time.
     
  11. pimentoLoaf macrumors 68000

    pimentoLoaf

    Joined:
    Dec 30, 2001
    Location:
    The SimCity Deli
    #11
    I also do it every Monday, using the "Disk Utility" program found in the "Utilities" folder.

    ... none of that terminal madness for me, oh no ...
     
  12. Vanilla macrumors 6502a

    Joined:
    Mar 19, 2002
    Location:
    Atlanta, GA
    #12
    I use cocktail which someone on this board recommended. It has a "Pilot" mode that runs through all sorts of stuff, including permissions ,which I run generally once a week.

    However, I like yourself am interested to know what exactly "Permissions" are and why they need regular maintenance.

    Vanilla
     
  13. jsw Moderator emeritus

    jsw

    Joined:
    Mar 16, 2004
    Location:
    Andover, MA
    #13
    Permissions are what tell OS X who is allowed to do what to a given file - "who" being divided into the owner, the group the owner is in, and the "world"; and "what" being, essentially, the ability to read and/or write and/or execute the file.

    If permissions are messed up, files which need to be accessed or used by applications might not be as accessible or usable as they need.

    As to why you need it... I've wondered that myself. I'd think OS X wouldn't get so messed up so often that it needs it, but perhaps it's a consequence of lots of different apps installing lots of different things. I don't recall ever needing to repair permissions on my Sun box at work. Maybe it was done automagically.
     
  14. blackpeter macrumors 6502a

    Joined:
    Aug 14, 2001
    #14


    I do the same thing, but with a little app named "Cocktail." It performs all these tasks and a lot more. You can find a demo on VersionTracker. The full version costs $10.
     
  15. jsw Moderator emeritus

    jsw

    Joined:
    Mar 16, 2004
    Location:
    Andover, MA
    #15
    Pretty cool - I'd heard about it, but just checked the info on VersionTracker now. Might have to get it! However, it's nice to write the occasional script as well just to see what's running under the hood....
     
  16. jsw Moderator emeritus

    jsw

    Joined:
    Mar 16, 2004
    Location:
    Andover, MA
    #16
    Note:

    If you run the script I posted above, or any script containing 'sudo' (which means "super-user do"), you'll need to enter an admin password when you run it - which, presumably, yours qualifies as, maybe unless you're using someone else's Mac).

    Once entered, the password is good for ~5 minutes, so, if a script containing multiple 'sudo' commands takes more than 5 minutes between commands, you'll need to re-enter the password.
     
  17. stevehaslip macrumors 6502a

    stevehaslip

    Joined:
    Apr 30, 2004
    Location:
    The Ocean Floor
    #17
    thanks jsw, sure i knew how to do the sudo tasks but i had no idea how to write a script to do it for me. Do you know of anywhere else i can go to learn more about apple scripting? what sort of other usesul things do you do with it?
     
  18. yellow Moderator emeritus

    yellow

    Joined:
    Oct 21, 2003
    Location:
    Portland, OR
    #18
    If you install something that requires an admin password, repairing permissions afterwards isn't a bad idea. Naturally if you're installing a buncha things, you can wait until they are all installed and then repair permissions. Otherwise, repairing permissions is a task that people use to make themselves feel better but accomplishes nothing..
     
  19. Savage Henry macrumors 65816

    Savage Henry

    Joined:
    Feb 20, 2004
    Location:
    in a one horse, two house, three pub town.
    #19
    Normally after every installation, or when things get a bit clunky.

    In calendar terms: every fortnight or so.
     
  20. jsw Moderator emeritus

    jsw

    Joined:
    Mar 16, 2004
    Location:
    Andover, MA
    #20
    Best source for AppleScript:

    "AppleScript: The Definitive Guide"

    I own it, but have just started looking into it (the book, and AppleScript in general).

    However... note that the above script is a UNIX script, not an AppleScript script. Same word, different connotations. For UNIX scripting, I'm sure there are plenty of on-line resources. I've picked up some knowledge over the years, but not much.
     
  21. Hoef macrumors 6502a

    Hoef

    Joined:
    Jul 11, 2004
    Location:
    Houston, TX..... (keep walking)
    #21
    CRON?

    Hey,
    Still learning my way around the Mac .... How would a user know that a cron "thingy" was done at night?
    Tx!
     
  22. cslewis macrumors 6502a

    cslewis

    Joined:
    Jul 23, 2004
    Location:
    40º27.8''N, 75º42.8''W
  23. jimthorn macrumors 6502a

    jimthorn

    Joined:
    Apr 24, 2003
    Location:
    Huntington Beach, CA, USA
    #23
    I always repair permissions before installing anything via Software Update, which means it gets done on my machine at least once a month. I've never had any problems, but I just play it safe anyway. Back on OS X 10.1, I never repaired permissions (I didn't know about it at the time), but I never had problems there either.

    I think Software Update should repair permissions automatically before installing OS point upgrades (10.3.4, 10.3.5, etc). Maybe in a future OS version (maybe even in Tiger..?).
     
  24. yellow Moderator emeritus

    yellow

    Joined:
    Oct 21, 2003
    Location:
    Portland, OR
    #24
    It depends on which cron "thingy" you're talking about. If it's the daily/weekly/monthly scripts, then there will be logged entries in:

    /var/log/daily.out
    /var/log/weekly.out
    /var/log/monthly.out
     
  25. Hoef macrumors 6502a

    Hoef

    Joined:
    Jul 11, 2004
    Location:
    Houston, TX..... (keep walking)
    #25
    Yep that's it ... Tx!
     

Share This Page