1

Related to the questions :

How to allow a vsftpd to write to a folder other than default /files? (The answers are not what I need)

and Allow local users to access /var/www folder in vsftpd (I don't understand the answer, I don't know how to do what is advised).

I set up vsftpd and it functions, but when I login remotely I can only write in my home folder and in folders I created via vsftpd.

When I change directories, it refuses to write.

I don't mind the restrictions generally speaking, but I would like to also be able to write in /var/www/html and in subdirectories.

Without stopping apache2 from reading them and without making the machine vulnerable to attacks.

I don't think I need to be root via ftp, I'm already root on the remote machine when I sit in front of it, if I type sudo su. So if it's dangerous to allow remote root I'd rather not set that up. And it would also be dangerous because I tend to write silly commands when I'm root.

To stop the ftp user from roaming around, I tried to shortcut leaving the whole directory tree opened to ftp by creating a symlink from /home/user_name/www to /var/www.

I fiddled with chmod and chown, I can get ftp to follow that symlink but it won't write in www nor in its subdirectories.

What should I do, please?

Andrew Schulman
  • 8,561
  • 21
  • 31
  • 47
Alain Reve
  • 11
  • 2
  • In the second question, "You can change the $HOME folder of ftp user to the /var/www instead of setting local_root in vsftpd.conf" sounds good, but I saw no such option in vsftpd.conf. How would that be done? – Alain Reve Nov 25 '20 at 12:04

0 Answers0