Macintosh HD/private , why i am seeing this?

Discussion in 'macOS' started by djrod, Oct 8, 2009.

  1. djrod macrumors 65816

    djrod

    Joined:
    Sep 16, 2008
    Location:
    Madrid - Spain
    #1
    Hi everyone.

    Today I realize I have a system folder called private that I don't think I should be viewing, looking at TimeMachine backups, this folder did not show a week ago.

    I'm running Snow Leopard 10.6.1, how can I hide it again?
     
  2. Darth.Titan macrumors 68030

    Darth.Titan

    Joined:
    Oct 31, 2007
    Location:
    Austin, TX
    #2
    Yeah that's supposed to be hidden. You can try
    Code:
    defaults write com.apple.finder AppleShowAllFiles FALSE
    and then
    Code:
    killall Finder
    in Terminal

    Anybody know off the top of their head to turn on the hidden attribute for a directory? I don't know if a permissions repair would do any good or not...
     
  3. bankshot macrumors 65816

    bankshot

    Joined:
    Jan 23, 2003
    Location:
    Southern California
    #3
    Sounds like the extended attribute that tells the Finder to ignore /private has been altered or deleted. You can verify this with the following commands in Terminal:

    ls -led@ /private
    xattr -p com.apple.FinderInfo /private


    The first command should show something like this (with a different date):
    Code:
    drwxr-xr-x@ 6 root  wheel  204 Sep  3 09:03 /private/
            com.apple.FinderInfo     32
    The second should show this:
    Code:
    00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    If either command doesn't show those results, there's your problem. You can restore the proper extended attribute with this command:
    Code:
    sudo xattr -w -x com.apple.FinderInfo '00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00' /private
    (all one line)

    Hope this helps.
     
  4. djrod thread starter macrumors 65816

    djrod

    Joined:
    Sep 16, 2008
    Location:
    Madrid - Spain
    #4
    Thanks, but did not work, is still in there :(
     
  5. djrod thread starter macrumors 65816

    djrod

    Joined:
    Sep 16, 2008
    Location:
    Madrid - Spain
    #5
    Wow, that worked! Thank U very much :D
     
  6. ni240sx macrumors newbie

    Joined:
    Feb 8, 2010
    #6
    the first command came out as described, but not the second command. so i used the restore command. and got this error message

    sudo: /etc/sudoers is mode 0666, should be 0440
    Segmentation fault

    is there a different method to approach this? thanks.
    _____________

    UPDATE: after doing some more googling. and i found the solution. just needed the disk utility to repair disk permissions. and i've been able to hide this "private" folder.
     
  7. Hal Itosis macrumors 6502a

    Hal Itosis

    Joined:
    Feb 20, 2010
    #7
    For Leopard and higher (presumably),

    sudo chflags hidden /private


    --<edit>--

    I'm amazed that would work at all, since there is no -x option for xattr.
    Attempting to use it should have failed with...
    Code:
    [b]
    option -x not recognized
    [/b][size="1"]
    usage: xattr [-l] file [file ...]
           xattr -p [-l] attr_name file [file ...]
           xattr -w attr_name attr_value file [file ...]
           xattr -d attr_name file [file ...]
    
    The first form lists the names of all xattrs on the given file(s).
    The second form (-p) prints the value of the xattr attr_name.
    The third form (-w) sets the value of the xattr attr_name to attr_value.
    The fourth form (-d) deletes the xattr attr_name.
    
    options:
      -h: print this help
      -l: print long format (attr_name: attr_value)
    [/size]
    --<edit>--

    FWIW, if folks want to experiment with chflags, a hidden item can be made visible again via:

    chflags nohidden /path/to/item
     

Share This Page