diff --git a/tools/proftp.php b/tools/proftp.php index f5ef1463..f4fcbf27 100644 --- a/tools/proftp.php +++ b/tools/proftp.php @@ -36,7 +36,7 @@ { $row = pg_fetch_array($result, $ri); $content.='# path: '.$row['path']."\n"; - $content.='mkdir -p "/home/ftp/westdc_'.$row['userid'].'/'.basename($row['path']).'"'."\n"; + $content.='mkdir -p "/home/ftp/westdc_'.$row['userid'].'/'.preg_replace('/^.+[\\\\\\/]/', '', rtrim($row['path'],'/')).'"'."\n"; $content.='mount --bind "'.$row['path'].'" "/home/ftp/westdc_'.$row['userid'].'/'.preg_replace('/^.+[\\\\\\/]/', '', rtrim($row['path'],'/')).'"'."\n"; } $filename='./proftp-user.sh';