1

I have a problem and I am not sure how to approach it. Some research has let me to different results, like configuring vsftpd, using bindfs or suggesting to move everything to another shared location, but I am not sure wich is actually the best practise in this example and would like to do it correctly and well.

I serve a website from the home directory of one user, called user1. I want to give another user user2 access via an ftp connection (using vsftpd) only to the directory of that webserver. I would want that user2 automatically connects to this folder and is restricted to it and its subdirectories.

My folder structure:

/home
  /user1
    /folder1
    /folder2
    /folder-webserver
       /subdirectories
       files

Which approach is actually the best practise to do this? Mount the folder in user2's home directory? Or is there a way to configure vsftpd to do this? Or create a user group? Or move everything to a shared location?

Thanks for the help, it's appreciated!

  • "best" is subjective. You start with a misconception: you -never- use /home for FTP. Never. /home is for local users. When you use SFTP you use a specific directory from / (for instance /sftp/ and best practice would be on a partition ) You can then create GROUPS and add users to them so they can share directories. You do NOT alter permissions in /home for this. – Rinzwind Jun 21 '22 at 21:43
  • @Rinzwind Thanks for your remark. Would this guide be an appropriate solution to what you are talking about? – DesperateCookie Jun 22 '22 at 11:42

0 Answers0