RGW logfile does not get chowned properly
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.
#1 Updated by Nathan Cutler almost 6 years ago
- Status changed from New to Pending Backport
already in master, hammer: https://github.com/ceph/ceph/commit/41611ea27a42d6221c418613d24dce34d988f2e6