pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: nextcloud, uids, permissions



Hi,

Greg Troxel <gdt%lexort.com@localhost> writes:

> I just updated a production machine to 2021Q1 (using a local binary
> package set just big enough to contain what I care about).
>
> I have had a nextcloud instance for a long time.  Originally it was
> apache and mod_php and it has been nginx with php-fpm for quite a while.
>
> After the upgrade, nextcloud was broken, and it was hard to figure out
> because there were no logs.  The problem turned out to be that the
> nextcloud data directory and config file were www:www, as used to work
> in apache, and now I need to set them to fpm:www because the php is run
> by fom.
>
> The nextcloud files are set to APACHE_USER, and that in the package is
> ?= to nginx, but it's already set, on my system, and I don't think I
> force it.
>
> So while I'm straightened out, it seeems this is difficult in terms of
> makin pkgsrc do the right thing.  I guess I'm not sure if different uids
> for different web implementations are a good idea; it sort of feels like
> they maybe all should be www, as which mechanism shouldn't necessarily
> affect one's config.

I am using the following patch to /usr/pkg/etc/php-fpm.d/www.conf
for www/php-nextcloud for some month at least.
I am using nginx and php-fpm.

--- share/examples/php/php-fpm.d/www.conf	2021-02-27 01:23:13.000000000 +0900
+++ /usr/pkg/etc/php-fpm.d/www.conf	2021-01-20 00:14:24.841606332 +0900
@@ -20,7 +20,7 @@
 ; Unix user/group of processes
 ; Note: The user is mandatory. If the group is not set, the default user's group
 ;       will be used.
-user = fpm
+user = www
 group = www
 
 ; The address on which to accept FastCGI requests.


As far as I remember correctly, older php-fpm used user=www.

Thank you.

-- 
Ryo ONODERA // ryo%tetera.org@localhost
PGP fingerprint = 82A2 DC91 76E0 A10A 8ABB  FD1B F404 27FA C7D1 15F3


Home | Main Index | Thread Index | Old Index