I'm running a web app in a FreeBSD jail. Nginx and PHP are configured as user:group www:www.
I have a chrooted SFTP user who also is in the group www. (SFTPuser:www) My goal is that the files that I upload as this user appear as belonging to my php app and vice versa.
What would be the right way to achieve this?
Change his UID to be the same as www?
Or make his name and the one of the PHP-FPM process the same?
Would I then have problems with Nginx?