Bug #12073

Updated by Nathan Cutler over 4 years ago

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

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.