jail ftp user asega + aseu
This commit is contained in:
@@ -57,6 +57,10 @@ while ( my $line = $tail->GetLine() ) {
|
|||||||
or warn getTimeStamp("log") . " >> $truser not in passwd file.\n";
|
or warn getTimeStamp("log") . " >> $truser not in passwd file.\n";
|
||||||
|
|
||||||
my ( $filename, $path, $suffix ) = fileparse( $trfile, qr/\.[^.]*/ );
|
my ( $filename, $path, $suffix ) = fileparse( $trfile, qr/\.[^.]*/ );
|
||||||
|
if ( $path eq "/" ) {
|
||||||
|
$path = "/home/" . $truser . "/";
|
||||||
|
$trfile = "/home/" . $truser . $trfile;
|
||||||
|
}
|
||||||
|
|
||||||
if ( ( ( uc $suffix ) eq ( uc $ext ) )
|
if ( ( ( uc $suffix ) eq ( uc $ext ) )
|
||||||
and ( $filename =~ m/^(\d\d_\d\d\d\d_|)(DT\d\d\d\d|LOC\d*)$/i ) )
|
and ( $filename =~ m/^(\d\d_\d\d\d\d_|)(DT\d\d\d\d|LOC\d*)$/i ) )
|
||||||
@@ -66,7 +70,7 @@ while ( my $line = $tail->GetLine() ) {
|
|||||||
|
|
||||||
if ( !-d "$path/log" ) {
|
if ( !-d "$path/log" ) {
|
||||||
make_path "$path/log",
|
make_path "$path/log",
|
||||||
{ mode => 0755, owner => $truser, group => $truser }
|
{ mode => 0755, owner => $truser, group => $gid }
|
||||||
or warn getTimeStamp("log")
|
or warn getTimeStamp("log")
|
||||||
. " >> Failed to create path: $path/log";
|
. " >> Failed to create path: $path/log";
|
||||||
}
|
}
|
||||||
@@ -74,7 +78,7 @@ while ( my $line = $tail->GetLine() ) {
|
|||||||
my $outpath = $path . $unit;
|
my $outpath = $path . $unit;
|
||||||
if ( !-d "$outpath/SQL" ) {
|
if ( !-d "$outpath/SQL" ) {
|
||||||
make_path "$outpath/SQL",
|
make_path "$outpath/SQL",
|
||||||
{ mode => 0755, owner => $truser, group => $truser }
|
{ mode => 0755, owner => $truser, group => $gid }
|
||||||
or warn getTimeStamp("log")
|
or warn getTimeStamp("log")
|
||||||
. " >> Failed to create path: $outpath/SQL";
|
. " >> Failed to create path: $outpath/SQL";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user