Make a 'big' directory, separate from all the other directories and files, to keep the user directories in. This will 'sandbox' them from the rest of the site. You can keep all the data in the database and all the user files in a user directory. The user can make subdirectories in the user directory. You can put some files in the user directory, mainly as a backup to the database, but if you have photo albums you might put album pages in it.
$usr_dir = "./User_Files/".$user_name;
$usr_path = "./User_Files/".$user_name."/";
It's important that everything be chmodded so that it can be deleted later if need be. In php you have to supply the full path to copy, chmod or move files