diff --git a/root/etc/e-smith/events/actions/user-update-auto-response b/root/etc/e-smith/events/actions/user-update-auto-response index 7260bdc..11cded2 100644 --- a/root/etc/e-smith/events/actions/user-update-auto-response +++ b/root/etc/e-smith/events/actions/user-update-auto-response @@ -3,6 +3,7 @@ use strict; use esmith::AccountsDB; use esmith::templates; +use esmith::util; use User::pwent; my $a = esmith::AccountsDB->open or @@ -26,7 +27,10 @@ foreach my $user (@users){ my $userName = $user->key; my $home = getpwnam($userName)->dir; - mkdir $home . '/.lock-auto-reply' unless -d $home . '/.lock-auto-reply'; + unless (-d $home . '/.lock-auto-reply'){ + mkdir $home . '/.lock-auto-reply'; + esmith::util::chownFile($userName, $userName, $home . '/.lock-auto-reply'); + } esmith::templates::processTemplate ({ MORE_DATA => { USERNAME => $userName },