I own a website that allows users to upload files. I have MY files on there as well, but I don't want to mix their files with mine, just in case somebody puts a bunch of malicious files and need to be mass removed. Rather than hunting them down individually, I can just delete their user folder and poof, they disappear of the website, but all the other users files and mine remain.
Now heres the catch, I wanted the users to browse a directory on the website but it would show ALL the files, mine and the users, as if they were contained in 1 directory. So I used PHP to do that and just display it to the user, and it works fine.
Problem is, I want to allow users to use FTP to browse them as if they were 1 directory as well. Of course that cannot happen since FTP just looks at the folder I tell it to. First idea would be symlinks, but I'm using VSFTPD and apparently that doesn't support symlinks. I was going to make a script that would update daily and create a sort of "pseudo directory" where everything would be combined as symlinks. This way at least the link would be in the same folder, without actually changing the real constriction of the folder layout. I'd just use python or something, but seeing as I can't use symlinks, that doesn't seem like an option either.
Just so you have some context, here's where MY files are located:
/drives/ares/webroot/mywebsite/files/SOMEFOLDER/SOMEFILE.txt
Here's how the user files are constructed
/drives/ares/webroot/mywebsite/users/SOMEUSERNAME/files/SOMEFOLDER/SOMEFILE.txt
For the website, I used PHP to recursively iterate through every user, and if the user folder contains 'SOMEFOLDER', it will read all the files in it and display it along with the files found in the other 'SOMEFOLDER' (my files). Its hard to explain, but I'm basically just combining a ton of directories so they appear as 1 one my website, for easier browsing. I'm now attempting to do the same thing with FTP, but since FTP is so straight forward, I'm having trouble finding a solution. Does anybody have any ideas on how I can achieve this? Thanks for any help, and sorry about the broad question, but I've been racking my brain for a while on this one.
PS: I'm on Arch Linux