I have set up the following stack: Nginx, php-fpm and Pure-FTPD on a debian 6.

In order for PHP-FPM pools to run under each different user I have created a system user for each website I host under /var/www;

I have set up pure-ftpd with mysql virtual users support (pure-ftpd-mysql). It works and I can read the files under /var/www/example.com . However I can't write or edit anything because they're owned by the Example user.

I know a possible solution would be to have 775 permissions for /var/www/example.com (pure-ftpd's user and Example user are in the same group), but I don't want it this way... .

So is there another (possibly better way) to have pure-ftpd's user full access to /var/www/example.com/ and /var/www/example-2.com?


Have you looked at Posix ACLs?

  • would you mind expanding a bit on how posix acls can help in this situation ? – Iain May 6 '12 at 13:32
  • well, I was thinking to achive some cPanel-like functionality, but avoiding as much as possible setuids and such, as I consider it a possible security threat. Thanks for sharing your knowledge, I'll take a look at your suggestion. – adrian7 May 7 '12 at 10:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.