mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 16:50:24 +00:00
Allow configuration of default user and group for new log files https://github.com/webmin/webmin/issues/1747
This commit is contained in:
@@ -22,3 +22,5 @@ start_cmd=Command to start syslog,3,Just run server
|
||||
restart_cmd=Command to apply changes,3,Kill and re-start server
|
||||
signal_cmd=Command to re-open log files,3,Send HUP signal
|
||||
tail_cmd=Tail command and arguments,3,Default (tail -n LINES)
|
||||
log_user=Owner for new log files,3,root
|
||||
log_group=Group for new log files,3,Based on owner
|
||||
|
||||
@@ -181,7 +181,9 @@ else {
|
||||
open(FILE, ">>$in{'file'}") ||
|
||||
&error(&text('save_efile', $in{'file'}, $!));
|
||||
close(FILE);
|
||||
&system_logged("chmod go-wx ".quotemeta($in{'file'}));
|
||||
my $user = $config{'log_user'} || 'root';
|
||||
my $group = $config{'log_group'};
|
||||
&set_ownership_permissions($user, $group, 644, $in{'file'});
|
||||
$log->{'file'} = $in{'file'};
|
||||
$log->{'sync'} = $in{'sync'};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user