Permissions differ on Š

Discussion in 'Apple' started by Chris H., Feb 1, 2008.

  1. Chris H.

    Chris H. Guest

    I installed Leopard shortly after it was released. In the last several
    weeks I have noticed a recurring message when I run Disk Utility
    Verify/Repair Disk Permissions.

    Repair Disk Permissions will get rid of the message pasted below, but it
    will reappear at some point latter on. I have not been able to determine
    the cause of this message.


    Repairing permissions for ³Macintosh HD²
    Permissions differ on "private/var/log/secure.log", should be -rw-------
    , they are -rw-r----- .
     
    Chris H., Feb 1, 2008
    #1
    1. Advertisements

  2. Chris H.

    billy Guest

    When the weekly system maintenance is run, and this log file is rotated,
    the permissions on it get restored to their former, incorrect mode.
    Here's some reading from the past about this. Sad to see it has not
    gotten fixed in 10.5.

    This is not necessary for OS 10.3 bcause it NEVER rotates secure.log(!).

    And, I don't have 10.5, so I don't know if the locations mentioned below
    are the same for it as they are in 10.4. But, this will at least get you
    pointed in the right direction, if you want to deal with this. I would
    not call it a major problem, but is it annoying? Yes.

    Billy Y..


    Date: Wed, 28 Jun 2006 14:03:08
    Newsgroups: comp.sys.mac.system
    Re: 10.4.7 is out
    That's been a permissions problem for sometime now, Apple needs to fix
    that. There's a quick fix for that if you want it:

    Create a plain text file and add this text:

    #!/bin/sh -
    PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin
    cd /var/log
    if [ -f "secure.log" ]; then
    echo "Setting secure.log permissions"
    chmod 600 "secure.log"
    fi

    Save the file to /etc/weekly.local <-- weekly.local is the file name
    and can't have a .txt extension

    In the Terminal run the following two commands at the prompt and supply
    your admin password when requested:

    sudo chmod 555 /etc/weekly.local

    sudo chown root:wheel /etc/weekly.local

    When the weekly periodic task gets executed it rotates the secure.log
    file and creates a fresh one. The fresh one has the wrong permissions.
    The weekly.local script is run at the end of the weekly periodic task
    and corrects the secure.log permissions.

    For creating the weekly.local file I prefer BBEdit (as I own a copy)
    although TextWrangler is just as good for this. TextEdit will work but
    make sure it's a plain text file and doesn't have a .txt extension. You
    probably want to set the encoding to "Western (Mac OS Roman)" as well.

    If you have another way of setting the owner and permissions on the
    weekly.local file you don't need to use the Terminal. I set the owner
    and permissions the same as the weekly periodic script:

    -r-xr-xr-x root wheel /etc/periodic/weekly/500.weekly

    You could just fix the periodic script so it creates the new file with
    the proper permissions but you risk having that file overwritten by a
    system update. Until Apple fixes this, the local file is the best option.
     
    billy, Feb 1, 2008
    #2
    1. Advertisements

  3. Chris H.

    Ian Gregory Guest

    If you are really worried about admin users reading your
    secure.log file then you might want to do something about this.
    Otherwise those permissions are fine and it doesn't matter if
    there is a BOM file somewhere which thinks it shouldn't have
    group read.

    If you don't like seeing the message then don't run Repair
    Permissions:)

    Ian
     
    Ian Gregory, Feb 1, 2008
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.