-2

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?

basbebe
  • 313
  • 2
  • 16

1 Answers1

0

uuid = unique user idnetifier

that means one per user

just add a password to the php account and make it able to log in then add it to the ftp users

I have never done it because I'm sure it adds tone of security holes, and it is likely that this will break a few things but if you really want to...

Desultory
  • 87
  • 3
  • 13
  • Both my www account and my SFTP user have set `nologin` as shell. ISPconfig makes something similar (sharing UID between SSH users and PHP-FPM pool. What would be regarded as "best practice" for this typical usecase? – basbebe Apr 06 '15 at 17:17