#804859 dirvish: no chmod on backup dir if status isn't 'success' (exit code 149)

#804859#5
Date:
2015-11-12 13:21:20 UTC
From:
To:
Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

After an rsync error dirvish did no chmod on the backup dir.

This is an problem because monitoring tools, which are normaly not running as root, aren't able to read the files in there  (summary/rsync_error/log).

The fix of this issue would be really simple, just move the chmod line before the exit command.
-----
--- dirvish.pl 2005-02-19 02:07:53.000000000 +0100 +++ dirvish.patch 2015-11-12 13:53:59.352294995 +0100 @@ -800,6 +800,8 @@ "$vault/$image/rsync_error", "$vault/$image/log"; +chmod oct($$Options{'image-perm'}) || 0755, "$vault/$image"; + $Status eq 'success' or exit 149; $$Options{log} =~ /.*(gzip)|(bzip2)/ @@ -824,8 +826,6 @@ and system "$$Options{index} $vault/$image/index"; }
----- *** End of the template - remove these template lines ***
#804859#10
Date:
2015-11-12 19:15:06 UTC
From:
To:
This is actually the expected behaviour of dirvish.

A failed image should not be readable, to avoid unknowingly accessing a
failed backup while attempting to restore something.

A monitoring tool can check whether the image directory is readable or
not to determine its success...

I'm leaving this bug report open as this information should be in the
man page; once the man page is corrected I will close this bug.


Paul