0

In vsftpd, I would like to have user upload file directly to web directory(/var/www/site/) however, the web directory is owned by www user and group.

I know there is chown_username and such thing for anonymous user however that doesn't work for my case. What do I do in vsftp?

thanks.

1 Answer 1

-1

You can add local_root=/var/www/site/ in the vsftpd.conf file as the root directory ftp user.

4
  • that's not my problem. the problem is that the ftp directory is owned by www-user and ftp user is not allowed to write to it. Commented Mar 8, 2012 at 6:07
  • you can give the perm for the ftp user to access the folder using setfacl command Commented Mar 8, 2012 at 6:26
  • I am hoping for a vsftp solution. Now I am resorting to adding ftp user to www-data group, set umask to 002 in vsftp and have the web root dir group writtable. Commented Mar 8, 2012 at 6:57
  • Even when the user is added to www-data group and file is uploaded through FTP Client, the user and group id of this file is different from www-data user/group id. And the file is not accessible from the web browser. Commented May 15, 2018 at 13:45

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.