Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 320143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:43:35+00:00 2026-05-12T08:43:35+00:00

I’m working on an installer for an application that I have ported to OSX,

  • 0

I’m working on an installer for an application that I have ported to OSX, but I don’t have much experience with this OS so I want to know where is the most appropriate location to install a database file that will be used by my app.

The database file is relatively small, and will be updated by a daemon process but must be accessible to all users on the system via a command-line tool. On Linux I have used /var/lib/myapp/mydata.db, what would be the OSX equivalent?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T08:43:35+00:00Added an answer on May 12, 2026 at 8:43 am

    There are two approaches on OS X:

    1. OS X defines application and user-level “application support” folders. These are in /Library/Application Support for system-wide and in ~/Library/Application Support/ for user-level support files. Application support folders are supposed to be named by the app’s bundle identifier (e.g. com.company.app), but many just use the application name. In general, OS X uses this pattern (system-level in /Library and user-level in ~/Library for application support, preferences, plugins, etc.). /Library is, by default read-only for non-administrator users. If your command line tool is run as root (or via sudo), then you could put your database file in /Library/Application Support/your-app. Of course, since you’ll need to do this in an installer script (either traditional unix style or via an OS X installation package), you could modify the read-write permissions of your db file.

    2. As others have pointed out, OS X is a UNIX OS, so you can create /var/lib or any other folder to your liking. Many UNIX ports do this as it keeps things more consistent with other OSes that they support. If you do this, make sure to provide an unistaller script that removes the folders you add (assuming nothing else has been added to them by other apps/users/etc.!). Mac users generally frown on installers throwing crap all over the file system without an easy way to clean it up. Also, MacPorts, and Fink (two OSS package managers for OS X) use the /opt and /sw trees respectively. You probably don’t want to mess with those trees as it could cause problems for users of these package managers. Of course, one of the best ways to go if you want to keep things UNIX-y is to package your app for MacPorts or Fink. MacPorts is of the BSD ports tree lineage and Fink is of the debian lineage. MacPorts is the Apple-sanctioned package manager, but both seem popular.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a French site that I want to parse, but am running into
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
Does anyone know how can I replace this 2 symbol below from the string
I want to construct a data frame in an Rcpp function, but when I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.