unless (getpwnam('fex')) {
print "creating user fex\n";
- system 'useradd -s /bin/bash -c "File EXchange" -m fex';
+ system 'groupadd -g 80 fex 2>/dev/null || groupadd fex';
+ my @g = getgrnam('fex') or die "$0: cannot groupadd fex\n";
+ my $gid = $g[2];
+ if (getpwuid($gid)) {
+ system "useradd -s /bin/bash -c 'File EXchange' -g $gid -m fex"
+ } else {
+ system "useradd -s /bin/bash -c 'File EXchange' -u $gid -g $gid -m fex"
+ }
exit $? if $?;
}
mkdir "$FEXHOME/spool",0700 or die "cannot mkdir $FEXHOME/spool - $!\n";
mkdir "$FEXHOME/spool/.error",0700;
}
+foreach my $dir (qw'.dkeys .ukeys .akeys .skeys .gkeys .xkeys .locks') {
+ mkdir "$FEXHOME/spool/$dir",0700;
+}
+
chownr('fex',"$FEXHOME/spool/.");
# fex-VM?
chownr('fex',"$FEXHOME/locale/$locale");
$hl = "$FEXHOME/htdocs/locale/$locale";
symlink "$FEXHOME/locale/$locale/htdocs",$hl unless -l $hl;
+ chownr('fex',"$FEXHOME/htdocs/locale/$locale");
} else {
push @nlocales,"./install $1\n";
}