From 628df6c47c3f1ade5a1b50b1e8204fe417acc674 Mon Sep 17 00:00:00 2001 From: Matt Ezell Date: Mon, 23 Oct 2017 15:17:07 -0400 Subject: [PATCH] Manage /var/log/xcat/rflash permissions --- xCAT-server/lib/xcat/plugins/ipmi.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/ipmi.pm b/xCAT-server/lib/xcat/plugins/ipmi.pm index f6842ebc7..699112ff9 100644 --- a/xCAT-server/lib/xcat/plugins/ipmi.pm +++ b/xCAT-server/lib/xcat/plugins/ipmi.pm @@ -51,8 +51,10 @@ my $xcatdebugmode = 0; my $IPMIXCAT = "/opt/xcat/bin/ipmitool-xcat"; my $NON_BLOCK = 1; use constant RFLASH_LOG_DIR => "/var/log/xcat/rflash"; -unless (-d RFLASH_LOG_DIR) { - mkpath(RFLASH_LOG_DIR); +if (-d RFLASH_LOG_DIR) { + chmod 0700, RFLASH_LOG_DIR; +} else { + mkpath(RFLASH_LOG_DIR, 0, 0700); } require xCAT::data::ibmhwtypes;