I changed the Bugzilla/Config.pm sub "write_params" to put the file in /tmp instead. Here's the code:
sub write_params {
my ($param_data) = @_;
$param_data ||= Bugzilla->params;
my $datadir = bz_locations()->{'datadir'};
my $param_file = "$datadir/params";
# Adding the following line to test, jrah
my $tmpdir = "/tmp/";
local $Data::Dumper::Sortkeys = 1;
my ($fh, $tmpname) = File::Temp::tempfile('params.XXXXX',
DIR => $tmpdir );
# DIR => $datadir );
print $fh (Data::Dumper->Dump([$param_data], ['*param']))
|| die "Can't write param file: $!";
close $fh;
rename $tmpname, $param_file
or die "Can't rename $tmpname to $param_file: $!";
fix_file_permissions($param_file);
# And now we have to reset the params cache so that Bugzilla will re-read
# them.
delete Bugzilla->request_cache->{params};
}
It created the file fine now, but when it tries to move it back to the data directory, I get:
[Thu Jan 16 11:57:21 2014] [error] Can't rename /tmp/params.GCj0S to /opt/bugzilla/data/params: Permission denied at /opt/bugzilla/Bugzilla/Config.pm line 281.\n
But I double checked the directory:
/opt/bugzilla>ls -lad data
drwxrwxrwx. 8 XXX XXX 4096 Jan 16 11:54 data