Instead of re-inventing the wheel, what’s the best way to setup a very basic storage VPS for 2-3 users? I want some files to be accessible over HTTP (public and private folder) while others only over SFTP. I was thinking of setting up a simple nginx installation with openssh, which should look like this:
/var/www/public where every user is allowed to upload public files
/var/www/private/user1 where a user can store his private files, password protected
/home/user1 for files that will be accessible through SFTP only.
Obviously, other users aren’t able to access each other files, except for public files… and that’s where I’m currently stuck on.
@ElliotJ helped me out on IRC but I’m afraid I did something wrong because it’s not working like it should. JElliot advised me to make a symlink from /var/www/private/john to /home/john/www, so that John can only access his own or public files. But still, John can access files from everyone.
John is not root, he’s a normal user and only owns (chowns) folders /home/john/www (/var/www/private/john), /var/www/public and /home/john .
Am I making it harder that it is or is this the way to go?
Thanks.