I have a local machine that was sitting around & doing very little, so I decided to turn it into a NAS (Network Attached Storage) machine, with a 40GB disk for Ubuntu (13.10), a 160GB disk that's currently unused, and a 1TB drive that's hosting Movies and TV Shows I've converted from DVD recently.
I'd like to expand its functionality into hosting all the Music of the house (shared between my family members and myself), however I don't want to just disk quota everyone, as I know there's overlap in our music libraries.
Idealy, this is what I want to do:
[ ] Give everyone accounts, and give them FTP write access for '/mnt/1TB/Music/_Shared' (I know how to do this step easily).
[ ] Set up a (cron?) job so that when someone uploads a file to '/mnt/1TB/Music/_Shared', it makes a symbolic link in a folder '/mnt/1TB/Music/{USERNAME}' for each user.
How would I get Ubuntu to create a symbolic link back to a folder (with each person's username, which I've already created) when a file is uploaded to the shared (_Shared) pool?
For reference, I run this machine as a headless NAS, so I cannot accept GUI instructions. That said, I do have SSH access, FTP access (currently provided by vsftpd), and Webmin installed on the machine, so that I can do things more easily.
I am also using samba on this machine to provide the content (read-only) to everyone - I could just as easily allow people to write into a share for the _Shared music, if that would be easier to do for symbolic linking. While it would be easier for everyone to upload their music to the server, I am willing to sacrifice this (with only ftp being possible for uploading) to gain dynamic symbolic linking of everything uploaded.
I basically want a file to be uploaded. If it doesn't exist, it's stored in _Shared, and a symlink is created in the folder by the name of whoever uploaded it. If it already exists, and it's the same filesize, then it should be a prompt (as usual, to either overwrite or skip), and still create a symlink indifferent of the choice the user makes.
I have been using Ubuntu for about a year now, so I feel I have a decent grasp on it - I've just no idea where to begin such an idea, and trying to search for a similar thing hasn't proved successful yet.