var folder has items I don't have permission to see

Discussion in 'Mac Basics and Help' started by ptocco, Sep 28, 2017.

Tags:
  1. ptocco macrumors newbie

    ptocco

    Joined:
    Sep 28, 2017
    #1
    I'm wondering if any of the Mac experts here would know why there are a handful of folders under the /var folder that are marked off in red as being off limits (see below). I'm of course the machine owner and feel I should have rights to everything. (I may have taken the Macbook Pro into work one day and let them install remote software. Would that be the source of these marked folders?)

    I know I could probably change ownership if I wanted, with something like sudo chown or sudo chmod to make the folders open to all. However, I'm just trying to learn and understand the Mac environment. (I really need an SSH connection to run Drush so I can manage my Drupal site.)

    When I first bought my Mac used several years ago, I knew nothing about how to set up users. I think for several years my identity was simply "MacbookPro". Now I need to straighten that out. I eventually created another user name but it didn't have a folder in the Users folder until I made one today (so I can have a place to store new private SSH keys, for example).

    Also, is it normal to have a usr folder right below the User folder? The usr folder looks more like a system folder, while the Users folder looks like it holds normal users.

    Thanks to anyone who can shed some light. :)



    upload_2017-9-28_15-40-16.png
     
  2. mfram macrumors 65816

    Joined:
    Jan 23, 2010
    Location:
    San Diego, CA USA
    #2
    You’re seeing the standard folders associated with a working Unix system. MacOS is Unix underneath all that shine. And Unix has built in security right to the core. Some system files have been historically unreadable to normal users. Way back when, Unix systems were shared by multiple users at the same time because computers were expensive. And normal users generally had few rights to see system files.

    Anyway, I strongly recommend against changing any permissions or renaming any files that are considered hidden by the Finder. You can easily make your computer unbootable and you’d have to reinstall.
     
  3. mw360 macrumors 65816

    mw360

    Joined:
    Aug 15, 2010
    #3
    A few quick answers...

    As the machine owner you have the 'right' to login as 'root' and view those files. As a user of the machine, you are very much advised to avoid doing that. The reason is that when you run software, that software gets the same access rights as whoever you logged in as. You should log in as an ordinary user, so your software can't tinker with those system files to cause damage or security risks. As mfram says, this has been the way of Unix since, I don't know, the sixties or something, when Unix was intended as a multiuser environment from the start.

    Second, if you had to manually create a folder for your login (e.g. /Users/ptocco) then something went wrong, and if you can, you should try again. Who knows what else went wrong. Maybe this happened because you created the user, but didn't actually log in to it? Maybe you wanted to start copying files to that users's home folder first? I suspect the folders aren't created until you log in to the account for the first time.

    Third, I don't think there should be a /Users/usr folder normally, unless somebody created a login ID by the name of "usr". It's possible that folder was created in error by an application installer. Some applications install files to /usr and may have sent them to /Users/usr by mistake.
     
  4. Tech198, Sep 30, 2017
    Last edited: Sep 30, 2017

    Tech198 macrumors G4

    Joined:
    Mar 21, 2011
    Location:
    Australia, Perth
    #4
    You have full access to /usr/local

    You may have a right, but not by default. Any escalation, enable/disable, login as, root is better security...

    You may have the right to login as root, but doesn't mean u should, unless you know what you are doing.

    Users folder itself does hold your users home directories (Home, Other profile etc.). There is no separate /usr folder beneath on a fresh Mac OS install. So, it was placed there either by you/mstake, or app. The problem would be hunting down *which* app put it there in the first place.
     
  5. ptocco thread starter macrumors newbie

    ptocco

    Joined:
    Sep 28, 2017
    #5
    Thank you for those insights. As for the user identity issue, I believe it's resolved for now. The previous owner was a techie who wanted to let me continue using most of his installed software. He removed his identity completely, but that left me with only a 'default' identity I believe, which was 'MacBookPro'. I didn't know that was going to be a problem. So now under Users I see Deleted Users, MacBookPro, Shared, and Guest. The Home icon appears on the MacBookPro, indicating it's my user folder, and indeed, it has the .ssh folder where I needed to locate my ssh keys and trusted servers.

    As for the 'usr' folder I mentioned, I was vague when I said it was 'below' the Users folder. It's actually side by side with the Users folder, same level on the tree. Both folders are in the root. This is what it looks like, and I believe it is system related:

    upload_2017-10-4_9-25-19.png

    I suppose I can disregard it for now.

    Thank you so much for helping me get a grip!
     

Share This Page