proFTPd: Making Apache the owner of uploaded files

I google’d a lot and found no sufficient solution to the rather common problem.
This two directives need to be added to /etc/proftpd/proftpd.conf

This one switches the capabilities module on and enables the execution of chown():

<IfModule mod_cap.c>
   CapabilitiesEngine on
   CapabilitiesSet +CAP_CHOWN
</IfModule>

And this one defines which user/group it shall set:

<Directory /var/www>
   UserOwner www-data
   GroupOwner www-data
</Directory>

Then just restart the server:

service proftpd restart

Hope this helps.

proFTPd Documentation Quicklink: