-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sun, Oct 25, 2015 at 04:27:10PM +0000, Simon wrote: > Hi All, > > Using Debian 8 and I'd like to run rsnapshot as a regular (non-root) > user but it doesn't have permissions to drop the pid file in > /var/run. > > I created a directory called rsnapshot in /var/run with the > appropriate permissions which, I thought, fixed the problem. > Unfortunately, I now realise that the dir I created gets removed > upon a reboot. > > Could someone let me know the correct way create an > application-specific directory in /var/run (if that is the right > thing to do).
It seems to be that since a while, all those /run, /var/run etc. are on tmpfs anyway; the init machinery is supposed to set up the necessary subdirectories [1] [2]. This doesn't help you in your case, I guess, because you want to run rsnapshot "ad hoc". My gut feeling would be to set things up in a well-known sub-directory of the user's home, on the theory that this is the space the user controls. Either just ~/.rsnapshot, or ~/.backup, or if you want to go the full Freedesktop Monty, have a look at [3] (they specify /run/user for that; there's no such thing in my system, but my system is somewhat Freedesktop hostile by explicit choice, so that might be just a consequence of that. Perhaps going the systemd way fixes that). [1] https://wiki.debian.org/ReleaseGoals/RunDirectory#Policy [2] https://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit [3] http://www.freedesktop.org/software/systemd/man/file-hierarchy.html Regards - -- tomás -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlYt3kgACgkQBcgs9XrR2kaMtgCfSu74xjoNnwinPh8uxxKzUrZP vM4An0D5qD0ZPs2X3jLCEf+SOeOf29oy =FI7A -----END PGP SIGNATURE-----