[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Tarsnap config files are ignored



On Fri, Jul 22, 2016 at 07:25:17AM +0100, Chris wrote:
> I've experimented with moving tarsnap.conf to different locations, including
> /etc/, my home directory, and the root home directory, but none of them
> seem to work. I had a look at the Makefile generated by autoconf, and it
> looks to be correctly putting the conf file into /usr/local/etc.
> 
> I have found, though, that it *will* read my .tarsnaprc file. I had to put
> this into root home in order for it to be detected under sudo (which makes
> sense), so I have a workable system. I'm going to put it down to a weird
> glitch with my systems.

Hmm.  In detail, Tarsnap reads from:

- ~/.tarsnaprc, with ~ being expanded to the current home directory.
  In pseudocode, and with a dozen lines of error-checking removed:
      conffile = getpwuid(geteuid()).pw_dir + "/.tarnaprc";

  As such, it makes sense that it will find /root/.tarsnaprc when you are
  running with sudo.

- ETC_TARSNAP_CONF, which is defined in the Makefile as
    ${sysconfdir}/tarsnap.conf

  Unless something really weird happened, this should work out to be
    /usr/local/etc/tarsnap.conf

Note that tarsnap will not search any other locations (unless you use the
--configfile option).  Could you try putting your config file in
    /usr/local/etc/tarsnap.conf
, verify the permissions of that file with
    ls -l /usr/local/etc/tarsnap.conf
, and then try again?  I'm curious about why this might not be working.

(also, please double-check that you didn't typo "tarnsap" -- I write that 2 or
3 times a week!  :)

Cheers,
- Graham