on new account creation, create automatically www, stats and backups directories to help users keep their account clean

This commit is contained in:
mlutfy 2009-01-28 20:38:11 +00:00
parent 1b9ed23260
commit 1b83f2db42
1 changed files with 7 additions and 3 deletions

View File

@ -27,9 +27,13 @@ $( = $);
my $PTH="/var/alternc/html/".substr($name,0,1)."/".$name;
mkdir($PTH);
chown(33, $uid, $PTH);
system("/bin/chmod 02770 '$PTH'");
my @create_paths = ($PTH, $PTH . '/www', $PTH . '/stats', $PTH . '/backups');
for my $p (@create_paths) {
mkdir($p);
chown(33, $uid, $p);
system("/bin/chmod 02770 '$p'");
}
0;