Project

General

Profile

Actions

Bug #12073

closed

RGW logfile does not get chowned properly

Added by Nathan Cutler almost 9 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
% Done:

0%

Source:
other
Tags:
Backport:
firefly
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

On 2014-11-12 09:26:54 UTC Tim Serong reported:

The radosgw process runs as the www-data (or whatever) user, but it's unable to write to its log file, as the log file is owned by root.

The ceph-radosgw init script is actually meant to chown the log file to the proper user, which would make it writable by the radosgw process (line 73 onwards):

log_file=`$RADOSGW -n $name --show-config-value log_file`
if [ -n "$log_file" ] && [ ! -e "$log_file" ]; then
    touch "$log_file" 
    chown $user $log_file
fi

But, it only does this if the log file doesn't already exist (! -e). Unfortunately, an earlier invocation of `ceph-conf` in the init script ("ceph-conf -n client.radosgw.gateway host" on line 108) somehow results in this log file being created, so it never gets chowned properly, and thus isn't writable. Probably we should just remove the existence check and chown the log file regardless of whether it already exists or not.


Related issues 1 (0 open1 closed)

Copied to rgw - Backport #12074: RGW logfile does not get chowned properlyResolvedNathan Cutler06/18/2015Actions
Actions #1

Updated by Nathan Cutler almost 9 years ago

  • Status changed from New to Pending Backport
Actions #2

Updated by Nathan Cutler almost 9 years ago

  • Description updated (diff)
Actions #3

Updated by Nathan Cutler over 8 years ago

  • Status changed from Pending Backport to Resolved
Actions

Also available in: Atom PDF