From f0d2429f764aaa756fc8002309545b02dc45c199 Mon Sep 17 00:00:00 2001 From: Thorsten Behrens Date: Wed, 10 Dec 2014 11:53:43 +0100 Subject: [PATCH] Unconditionally chown rados log file. This fixes bnc#905047 (in a somewhat ad-hoc way). Sadly the log file gets created from several places, so its existence does not mean init-radosgw had actually run. Signed-off-by: Thorsten Behrens (cherry picked from commit 41611ea27a42d6221c418613d24dce34d988f2e6) --- src/init-radosgw | 6 ++++-- src/init-radosgw.sysv | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/init-radosgw b/src/init-radosgw index 5aa658c9f8c4e..914d6fddcc1a4 100644 --- a/src/init-radosgw +++ b/src/init-radosgw @@ -66,8 +66,10 @@ case "$1" in fi log_file=`$RADOSGW -n $name --show-config-value log_file` - if [ -n "$log_file" ] && [ ! -e "$log_file" ]; then - touch "$log_file" + if [ -n "$log_file" ]; then + if [ ! -e "$log_file" ]; then + touch "$log_file" + fi chown $user $log_file fi diff --git a/src/init-radosgw.sysv b/src/init-radosgw.sysv index fe56939003dff..102e6409fc8e3 100644 --- a/src/init-radosgw.sysv +++ b/src/init-radosgw.sysv @@ -73,8 +73,10 @@ case "$1" in fi log_file=`$RADOSGW -n $name --show-config-value log_file` - if [ -n "$log_file" ] && [ ! -e "$log_file" ]; then - touch "$log_file" + if [ -n "$log_file" ]; then + if [ ! -e "$log_file" ]; then + touch "$log_file" + fi chown $user $log_file fi -- 2.39.5