Question

Just installed vsftpd. What is the best way to give a user access to /var/www?

Many nginx tutorials say to make ownership of /var/www belong to www-data:www-data but tutorials on vsftpd say to make ownership that of the user you’re using to login via FTP.

So which is the best way to give an FTP user to read/write in /var/www?

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

If it’s the best way it’s arguable, but if I remember it right I added my ftp users to the www-data group, created a folder for the user in the /var/www/ and gave him its ownership, setting permissions accordingly.