it sound like a web-base file-system.
are u really need to create a phyical directory on harddisk to implement the system, or just do the same thing like that?
if first one, i think it is hard to prevent user use other folder, since like Tim said, all users (in your system) are using the same linux user (should be nobody). Ofcouse you can run php as root, but it is not recommend to do so.
But if you just to do a system you described,
you are not really need to create a phyical directory for each user. a database can help you.
for example,
create 3 tables in database:
user(userid, password, etc ... )
user_folder(folderid, userid)
folder_file(folderid, fileid, filename, filetype, filesize)
now you just need one phyical directory to store all files, all security checking you can be done in the script.
i hope this will help you