Do best-practices say to restrict the usage of /var to sudoers?

Posted by NewAlexandria on Super User See other posts from Super User or by NewAlexandria
Published on 2012-10-25T14:49:12Z Indexed on 2012/10/25 17:03 UTC
Read the original article Hit count: 205

I wrote a package, and would like to use /var to persist some data. The data I'm storing would perhaps even be thought of as an addition for /var/db.

The pattern I observe is that files in /var/db, and the surrounds, are owned by root. The primary (intended) use of the package filters cron jobs - meaning you would need permissions to edit the crontab.

  1. Should I presume a sudo install of the package?
  2. Should I have the package gracefully degrade to a /usr subdir, and if so then which one?
  3. If I 'opinionate' that any non-sudo install requires a configrc (with paths), where should the package look (presuming a shared-host environment) for that config file?

Incidentally, this package is a ruby gem, and you can find it here.

© Super User or respective owner

Related posts about linux

Related posts about permissions