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

[Xen-devel] [PATCH OSSTEST] ts-logs-capture: ensure captured log files are readable.

At least /var/log/libvirt/libvirtd.log is 0600 on the target machine
and this gets preserved in the captured logfile, eventually meaning
that apache on the log server cannot read the file to serve it ("You
don't have permission to access...").

There seems to be no harm in setting all log files to 0664, so do so.

Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
Currently visible at
but not mentioning in the commit log since it'll go away before long.
 ts-logs-capture | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ts-logs-capture b/ts-logs-capture
index dbca13a..5a994c7 100755
--- a/ts-logs-capture
+++ b/ts-logs-capture
@@ -59,6 +59,7 @@ END
             logm("fetching $logfile to $llogfile");
             if (!eval {
                 target_getfile_root($lho,60, $logfile,"$stash/$llogfile");
+               chmod(0664, "$stash/$llogfile") or die "chmod $stash/$llogfile 
                if ($logfile !~ m/\.gz$/) {
                    stat("$stash/$llogfile") or die "$stash/$llogfile $!";
                    compress_stashed($llogfile) if(stat _)[7] > 100000;

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.