Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In which directories should I place the following?
I have an application with few .net assemblies, a default database (containing default application settings), a directory with 100's of images, a directory for sounds (e.g. mp3's).





A requirement is that I want to allow my user to replace the sounds and images as they see fit so basically that path (e.g. /var or /usr) should typically have write access to a normal user.

share|improve this question
up vote 5 down vote accepted

If your application needs to be modifiable by a user, you should not be installing it to the system but have them do some kind of local-install to their user home folder. $HOME/yourapp/{bin,images,sounds} etc.

Most system paths like /var, /usr, are not and should not be write accessible by users.

The alternative is to install your app normally, but create a sort of overlay in $HOME/.yourapp that includes all the things the user has changed that are different from the system defaults.

share|improve this answer
+1 for the overlay approach. The application can look in $HOME first, and in the system path if the file isn't found. – André Paramés May 10 '11 at 12:30

You could follow the XDG Base Directory Specification and place the user-replacable stuff in a directory in $XDG_DATA_HOME and any user configuration files in a directory in $XDG_CONFIG_HOME (which default to $HOME/.local/share/ and $HOME/.config/ respectively).

I'm not sure this can be called the standard way of doing things yet but it's certainly popular, so your users will likely be familiar with it.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.