Unix folder structure exposed after installing Leopard

Discussion in 'macOS' started by lloydh, Nov 5, 2007.

  1. lloydh macrumors member

    Joined:
    Apr 29, 2007
    Location:
    London, England
    #1
    Hello


    I installed Leopard on my MacBook Pro (Core Duo) from day one (totally clean install) and thankfully it's been smooth-sailing.

    One niggle I had was that my Macintosh HD had all of the ugly Unix file structure exposed (see pic). I thought this was a bit sloppy and un-Apple, then when I saw a friend's mac and realised that it wasn't normal I assumed that for some reason hidden files were just visible - nope. I ran the command line commands to re-hide hidden files and it had no effect.

    [​IMG]

    Anyone know how I can amend this aesthetic atrocity?


    Thanks.
     
  2. IzzyJG99 macrumors 6502

    Joined:
    Oct 26, 2007
    #2
    All right. I ran into this several times. Whenever I would do a clean install of 10.5 I would get those folders that usually aren't there even if you want them to be there. Invisible files. It turned out that the name of my Hard Drive was confusing the installer. Naming the HD certain things really confuses the installer program. Rename your HD to "Macintosh HD" and then reinstall it and should be okay.

    I tried to install 20 times each a different way with the help of an Applecare Tech on the phone. They had no idea what to do. I finally changed the name of my HD back to "Macintosh HD" and it fixed the problem. They thought I had a bad disc and sent me a new one (I'll keep that one), so it is possible that if your HD is named "Macintosh HD" and you install and still have this problem you may have a bad disc. The tech said 2.5 million discs they estimate according to calls coming in went out flawed.
     
  3. robby818 macrumors 6502a

    Joined:
    May 2, 2007
    #3
    thank you for posting this information. I ran into the same issue, although my hard drive was named Macintosh HD. However, I did use disk utility to wipe the drive (blow away the boot camp partition) before i installed leopard, so maybe i did something or other....guess i'm doing another install tonight. :(
     
  4. mroseneo macrumors member

    Joined:
    Oct 17, 2007
    Location:
    Japan
    #4
    I have the same problem. I did a fresh install and upgraded to 10.5.2 immediately afterwards.

    Anyone know how to fix this? I guess it is not a big problem, but what is apple doing with their updates. They are supposed to fix bugs not make them.
     
  5. dvd macrumors regular

    dvd

    Joined:
    Oct 12, 2007
    Location:
    Massachusetts
    #5
  6. prostuff1 macrumors 65816

    prostuff1

    Joined:
    Jul 29, 2005
    Location:
    Don't step into the kawoosh...
    #6
    hum, i have never had this happen to me just because.

    I would try a program like cocktail. There is an option in there somewhere to so hidden files (which is what your system seems to be doing). Go ahead and check and uncheck that to see if it helps. Might have to do a restart in there also.

    Hope that helps
     
  7. dvd macrumors regular

    dvd

    Joined:
    Oct 12, 2007
    Location:
    Massachusetts
    #7
    I don't think that's what's happening for him as all of the dot files aren't showing up if it's the same hack I'm thinking of. To find out, go to terminal and do a:

    defaults read com.apple.finder AppleShowAllFiles

    output may be TRUE, FALSE, or something like this:
    2008-02-16 14:23:26.023 defaults[3807:10b]
    The domain/default pair of (com.apple.finder, AppleShowAllFiles) does not exist

    The above means the hack is not in place. If it comes back TRUE, that means the hack is on, and if it comes back FALSE, that means the hack has been applied but is disabled. I think there's an applescript out there that does all this, but manually...

    You can turn it on by typing:

    defaults write com.apple.finder AppleShowAllFiles TRUE
    killall Finder

    And then later turn it off with:

    defaults write com.apple.finder AppleShowAllFiles FALSE
    killall Finder
     
  8. rodman109110 macrumors 6502

    Joined:
    Jun 7, 2007
    #8
    has anyone been able to fix this without having to reinstall
     
  9. firesong macrumors member

    Joined:
    Jul 13, 2007
    #9
    There is a solution somewhere that requires XCode tools installed... I can't recall what it was, but I think you'll have to dig around for it.
     
  10. martychang macrumors regular

    Joined:
    Sep 3, 2007
    #10
    better question: how do I get this to happen on my system?! :eek:

    inability to see these things outside of a Terminal is somewhat of a nuisance to me as a Linuxite..
     
  11. firesong macrumors member

    Joined:
    Jul 13, 2007
    #11
    Wonder if this might help :
    Code:
    defaults write com.apple.finder AppleShowAllFiles TRUE
    killall Finder
     
  12. dvd macrumors regular

    dvd

    Joined:
    Oct 12, 2007
    Location:
    Massachusetts
    #12
    In terminal, type:

    cd /
    ls -lO (that's ell ess space minus ell capitol oh)

    You should see something like this:

    Code:
    total 41013
    drwxrwxr-x+ 69 root  admin  -          2346 Feb 21 23:21 Applications
    -rw-r--r--@  1 root  admin  hidden     1024 Jan 27 18:17 Desktop DB
    -rw-r--r--@  1 root  admin  hidden        2 Jan 27 17:22 Desktop DF
    drwxrwxr-t+ 52 root  admin  -          1768 Nov 30 15:17 Library
    drwxr-xr-x@  2 root  wheel  hidden       68 Sep 23 14:37 Network
    drwxr-xr-x   4 root  wheel  -           136 Feb 11 20:57 System
    drwxr-xr-x   5 root  admin  -           170 Nov 29 22:31 Users
    drwxrwxrwt@  7 root  admin  hidden      238 Feb 23 08:14 Volumes
    drwxr-xr-x@ 40 root  wheel  hidden     1360 Feb 11 20:54 bin
    drwxrwxr-t@  2 root  admin  hidden       68 Sep 23 14:37 cores
    dr-xr-xr-x   2 root  wheel  -           512 Feb 19 19:27 dev
    lrwxr-xr-x@  1 root  admin  hidden       11 Nov 29 22:10 etc -> private/etc
    dr-xr-xr-x   2 root  wheel  -             1 Feb 19 19:27 home
    -rw-r--r--@  1 root  wheel  hidden 10272820 Feb  5 22:42 mach_kernel
    -rw-r--r--@  1 root  wheel  hidden 10696809 Oct  9 21:38 mach_kernel.ctfsys
    dr-xr-xr-x   2 root  wheel  -             1 Feb 19 19:27 net
    drwxr-xr-x@  6 root  wheel  hidden      204 Nov 29 22:15 private
    drwxr-xr-x@ 66 root  wheel  hidden     2244 Feb 11 20:54 sbin
    lrwxr-xr-x@  1 root  admin  hidden       11 Nov 29 22:10 tmp -> private/tmp
    drwxr-xr-x@ 11 root  wheel  hidden      374 Nov 29 22:44 usr
    lrwxr-xr-x@  1 root  admin  hidden       11 Nov 29 22:10 var -> private/var
    Notice how many entries have the 'hidden' flag turned on i the 5th column. If the flag is missing then the directory or file will appear in finder.

    To add the hidden flag, for example for the /private folder, type:

    sudo chflags hidden /private

    To remove the hidden flag, type:

    sudo chflags nohidden /private

    You may be asked for your administrator password, but otherwise there will be no output from the chflags command. The results will reflect in Finder immediately, though.

    Don't mess with /dev, /home, or /net. They will be hidden automagically. The above output is from a "correctly" configured system, where only Applications, Library, System, and Users are exposed.

    This should solve it both for people who want to hide this stuff as well as for those few of you who might want to expose it, I suppose.
     
  13. PkennethV macrumors 6502a

    Joined:
    Aug 16, 2006
    Location:
    Toronto
    #13
    I'd try using the app that prostuff1's suggested before trying to perform a reinstall. Also, TinkerTool is a free app that will allow you to show/hide invisible files as well.
     
  14. John Sawyer macrumors newbie

    Joined:
    Oct 23, 2005
    Location:
    Berkeley, CA
    #14
    Invisibles

    Utilities like Cocktail, OnyX, etc. that hide/show invisibles by changing the "AppleShowAllFiles" value in the com.apple.Finder plist file, don't often (ever?) fix the bug discussed in this thread (visible etc, tmp, and var folders).

    There's no need to reinstall OS X to fix this bug. dvd's method above, of manually fixing an item's "hidden" flag, will work, and he also posted Apple's official fix for this bug further above. It usually works, so I'm surprised nobody reports trying it. But when it doesn't work, and if for some reason you want another method besides the Terminal method dvd describes, here's a method that always works, in my experience:

    http://systemsboy.blogspot.com/2006/02/scripts-part-4-cloning-whats-big-deal.html

    …which contains a link labeled "Download ASRClone", which gets you a disk image from which you run a utility named "FixHiddenFiles" to do the trick.

    As far as the tangential issue goes--changing the "AppleShowAllFiles" value in the com.apple.Finder plist file--as dvd also says above, if you first try to read this value, many Macs you try it on, will report the error "The domain/default pair of (com.apple.finder, AppleShowAllFiles) does not exist", if the com.apple.finder file has never been exposed to Cocktail, etc.'s option to show hidden files. The reason is the stock com.apple.finder file doesn't contain the AppleShowAllFiles sibling. But once you use any of these utils to show hidden files, or if you simply issue the write command dvd describes above:

    defaults write com.apple.Finder AppleShowAllFiles TRUE

    ...the "AppleShowAllFiles" sibling gets inserted into com.apple.finder, and from then on, you can manually change it using Terminal, etc. again using the "defaults write com.apple.Finder AppleShowAllFiles TRUE/FALSE" (or 0/1) command dvd describes.

    Don't use the file's full name, "com.apple.Finder.plist", or else these commands won't work.

    A useful utility to look at and edit plist files, is the Developer Tools' "Property List Editor".
     
  15. ni240sx macrumors newbie

    Joined:
    Feb 8, 2010
    #15
    after using the ls -lO command, i'd see that my private folder is not hidden (as it's a blank).

    drwxrwxrwx 7 root wheel - (blank) 238 Mar 16 19:03 private

    after entering the sudo chflags hidden /private command, i'd be getting this error message.

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

    is there an additional command to work around 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.
     

Share This Page