Project

General

Profile

Bug #12073

RGW logfile does not get chowned properly

Added by Nathan Cutler over 3 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Start date:
06/18/2015
Due date:
% Done:

0%

Source:
other
Tags:
Backport:
firefly
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

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

Copied to rgw - Backport #12074: RGW logfile does not get chowned properly Resolved 06/18/2015

History

#1 Updated by Nathan Cutler over 3 years ago

  • Status changed from New to Pending Backport

#2 Updated by Nathan Cutler over 3 years ago

  • Description updated (diff)

#3 Updated by Nathan Cutler about 3 years ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF