summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/commands.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/commands.pm b/perl-install/commands.pm
index 6719151f1..c57468cb0 100644
--- a/perl-install/commands.pm
+++ b/perl-install/commands.pm
@@ -127,10 +127,11 @@ sub chown_ {
my ($name, $group) = (split('\.'), $_);
my ($uid, $gid) = (getpwnam($name) || $name, getgrnam($group) || $group);
-
+
+ require POSIX;
my $chown; $chown = sub {
foreach (@_) {
- chown $uid, $gid, $_ or die "chown of file $_ failed: $!\n";
+ POSIX::lchown($uid, $gid, $_) or die "chown of file $_ failed: $!\n";
-d $_ && $rec and &$chown(glob_($_));
}
};