use mysql... (Database)
When the user upload the file, write in the db the name of the file and the user...
Now.. if the user want to download this file.. check first the db and then.. give access to the user to download this file
And something else... you can change the showing link.
How.. use md5
when you storage the file in the db... use the md5 fuction (encode)
and do the opposite when you grand the access