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

  • Home
  • SEARCH
  • 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 8681247
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:27:30+00:00 2026-06-12T21:27:30+00:00

I’m making a (qt) cross platform application that stores both cache and settings files.

  • 0

I’m making a (qt) cross platform application that stores both cache and settings files. After a lot of searching, i still haven’t found how and where to store them. Please note that i want to use QT’s stuff only where i would otherwise reinvent the wheel or save insane amounts of time; i want absolute control over the behavior of the application and qt is rather random or inefficient at times.

For linux, the default would be /etc//, but there’s no write access there and my app writes changes to it’s config file. for cache, that would be /var//, but by default there is no write access either. the settings and cache should preferably be user independent as it’s server software.

I have thought of several solutions, but they don’t seem very elegant:

  • Let the installer create those directories with the right permissions (that means i’m going to need an installer… bleh)
  • store it all in the user’s home directory, losing user independence
  • Let QT handle it (i really don’t like this one)

any ideas? what’s best practice? where does this stuff go on windows and mac?

Some clarification:
It’s a server application that is supposed to run independently of a single user, so it’s not desired to store anything at all in /home. It’s also not using any gui features of QT, the server is going to be managed by either settings files or a separate GUI that communicates with the server over IP.

  • 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-06-12T21:27:33+00:00Added an answer on June 12, 2026 at 9:27 pm

    If you really want to use these folders your application should be executed partially or completely with root privileges.

    Another thing you can do is:

    • setup a work directory myDir for your application, and everything is stored inside this work directory (the same way qtcreator does if you want an example).
    • Save your directory in a non-user specific location. I think /opt is a good candidate.
    • In myDir the required privilege to access\modify\execute files you want are set up for the users group.
    • myDir itself requires root to delete, but not the files inside.
    • Make the settings for your Qt application kinda self contained using QSettings

    Without an installer you will be the installer: moving around executing scripts and commands, and eventually writing an installation document (we are doing this in our startup now and it is just painful, we are in the process of changing to full installer mode)

    Note : Not an expert, but using two types of machines as servers seems like you guys are really looking for trouble. Or your app is targeting servers of all types maybe?

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

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I know there's a lot of other questions out there that deal with this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I am doing a simple coin flipping experiment for class that involves flipping a
I need a function that will clean a strings' special characters. I do NOT

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.