18

I've noticed that pkg installers and obviously apps installed from the App Store) put apps in the /Applications file, yet Steam usually puts them in ~/Applications. Both work, and both are writable by the user, but are there circumstances under which one should be done over the other?
I am the only user of this computer, and shared folders aside, I've disabled guest access.

(this is coming from a Linux user, so having a root folder be writable seems wrong, unless my permissions are wrong from the start)

7
  1. By default the root directory should not be directly writable, by other then root, without being prompt for permission with other users in Finder and or using sudo from the command line.

  2. IMO /Applications should be used over ~/Applications for most applications as that is the default location. Also I certainly do not want to bloat out my Home folder with applications. I like keeping User Data separate from the OS and Applications, it just makes logical sense for many reasons.

  • I didn't mean the root directory itself, I meant first level directories inside the root (i.e. /etc, /usr, /bin). But it looks like the reason is because my user is in the admin group, and only root and the admin group can write to/execute in /Applications. But thanks for the tip, from now on I'll put apps in the /Applications folder. It just felt wrong. – eggbertx Aug 6 '15 at 3:46
  • @Josh, Directories such as /etc, /usr, /bin should not be directly writable by the Admin account, it should still prompt for permission in Finder or having to use sudo from the command line. – user3439894 Aug 6 '15 at 3:52
  • @Josh, an off-topic piece of advice, but there's not a compelling reason to have your every-day account be in the admin group. I'd recommend to create at least two users -- one with admin, the others without, and only use the admin credentials when prompted. I think that in Linux, you need to be in the group in order to sudo; but, the password dialogs in OS X allow you to specify the (admin-capable) user as well. At the terminal level, you would need to "su (your-admin-user)" before sudo would do anything, but that is just a minor inconvenience. – Kent Aug 6 '15 at 7:54
  • You haven’t really explored why the default location is automatically better. And what are the many reasons why user data should be kept separate from the OS’s files? – bdesham Aug 6 '15 at 17:07
  • 1
    One more important thing is security. Potential malware cannot modify files (including application) stored in system directories. Applications in user directory have no such protection. – el.pescado Aug 6 '15 at 19:04
41

What no-one seems to have pointed out so far is that /Applications are usable by everybody & ~/Applications are only for that user.

Some installers will ask if you want to install for this user or for everybody. That's how it can differentiate.

That will be one of the reasons Steam installs to there, as it's a per user license.

Apple's app licensing, though 'per ID' doesn't prevent all a machine's users from accessing apps purchased under another user account, so everything else usually goes in /Applications by default.

Of course, if you're the machine's sole user, the distinction becomes moot.

  • You type much quicker than I do! – Scott Porter Aug 6 '15 at 6:48
  • 1
    This should be the accepted answer. Bravo sir, couldn't have said it better myself. – Oxcug Aug 6 '15 at 15:12
  • Sorry, I didn't think the obvious needed pointing out! – user3439894 Aug 7 '15 at 1:01
1

I believe it is a permissions issue. OSX is a multi user system, each user can have his own apps, files and folders. Here is what Apple says about Users:

Standard user: Standard users are set up by an administrator. A standard user can install apps and change settings for his or her own use. Standard users can’t add other users or change other users’ settings.

Managed user: Users who are managed with parental controls can access only the apps and content specified by the administrator managing the user. The administrator can restrict the user’s contacts and website access, and place time limits on computer use.

https://support.apple.com/kb/PH18891?locale=en_US

I think the ~/Applications will only be accessed by the particular User. If you have 3 users there will be /Applications, UserA/Applications, UserB/Applications, UserC/Applications. UserA will not have access to UserB/Applications or UserC/Applications. All 3 will have access to /Applications though.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .