By batricbatric
Hello,
The VSFTPD article does not explain how to complete the setup for web servers.
Most of the users will be using it with Apache/nginx/etc. so it will be really useful if you could write an article explaining how to set that up, what are appropriate permissions etc.
Until then - I would really appreciate if someone could post the setup here, as I’m struggling with it now. The web is full of resources but none of them offer a universal solution and most of them are outdated.
Thanks!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Well, enable LocalUsers in VSFtpd, chroot them into their homes and you’re most likely done - short version, sorry :-)
That’s not the point of my question. <br> <br>I want this to work with a webserver and to allow users to upload files to /var/www/ and not to /home/[user]/files
VSFTPD, and any other FTP solution is going to upload / chroot to the users home directory, so if, when you created a user, you set their home directory to /home/username, then that’s the directory that will be used by vsftpd. <br> <br>You can use useradd -d to set the home directory for new users, i.e. <br> <br>useradd -d /path/to/upload/folder username <br> <br>So if your username was batric, for example, and you wanted the user to upload to /var/www or /var/www/batric, then you’d use one of the following: <br> <br>useradd -d /var/www batric <br> <br>- OR - <br> <br>useradd -d /var/www/batric batric <br> <br> <br> <br>You can use usermod to change the directory of an existing user. <br> <br>usermod -d /var/www batric <br> <br>usermod -d /path/to/any/directory batric <br> <br>usermod -d /home/batric <br> <br>…etc :-).
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.