mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 08:40:24 +00:00
Set ownership to match parent dir
This commit is contained in:
@@ -1280,8 +1280,14 @@ sub set_ownership
|
||||
{
|
||||
local ($user, $group, $perms);
|
||||
if ($config{'file_owner'}) {
|
||||
# From config
|
||||
($user, $group) = split(/:/, $config{'file_owner'});
|
||||
}
|
||||
elsif ($_[0] =~ /^(.*)\/([^\/]+)$/) {
|
||||
# Match parent dir
|
||||
my @st = stat($1);
|
||||
($user, $group) = ($st[4], $st[5]);
|
||||
}
|
||||
if ($config{'file_perms'}) {
|
||||
$perms = oct($config{'file_perms'});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user