I'm writing a custom application that will be run as a service/daemon. According to convention, the binaries for it should be in /opt/appname. However, where do I put files such as:

  • Config files
  • Cache and storage
  • Logs
link|improve this question

feedback

3 Answers

up vote 2 down vote accepted

If you're using /opt/<appname> for your app then config files go under /etc/opt, and the rest goes under /var/opt.

source

link|improve this answer
feedback

Have a look at the Filesystem Hierarchy Standard which youd tell you what you want to know.

link|improve this answer
feedback

Ideally, you don't care where it's installed, and you can configure the app at build or install time. If, for example, you're building an application that will run on Debian, you can create a .deb package and skip this entire question.

link|improve this answer
Sure, the server admin can configure the app any way he wants, but that's precisely what I have to do, to not only develop but also install the app. – Bart van Heukelom Dec 21 '10 at 22:29
feedback

Your Answer

 
or
required, but never shown

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