pixelfed/docs

Arch Linux: php-fpm.service prevents installation into /home/pixelfed

Closed this issue · 3 comments

After following the instructions for installation on Arch (https://docs.pixelfed.org/installing-pixelfed/guides/arch.html) when loading the pixelfed home page in the browser (Firefox / Chromium) I get the File not found. message.

I have set up the nginx.conf as per the docs, only changing my server_name to what I type in the browser.
I have checked the rest of the configuration, it looks good. I have checked the content of $document_root$fastcgi_script_name and it returns precisely the path where the public folder is.

Any idea what could have gone wrong or how I can find out?

In the php-fpm.service I can see the following:

# The directories /home, /root and /run/user are made inaccessible and empty for processes
# invoked by this unit.
ProtectHome=true

I think it contradicts the instructions where it says to clone the repo in /home/pixelfed
and this leads to the 'File not found' error.

Switching this setting to false solves it. Maybe it's not the best idea and moving the repo to another folder is better.

trwnh commented

this would probably be a change in how arch packages php-fpm. i think arch technically prefers to have applications serve their data out of /srv, e.g. /srv/http or /srv/pixelfed. officially packaged webapps use /usr/share/webapps. the recommendation to clone the repo into /home/pixelfed is perhaps a lazy hack, as the proper solution would be to explicitly set a home directory when creating the app-user, but there are some sysadmins who prefer to create unix users for each and every application they run...

this is of course a matter of opinion on whether you should install into /usr/share/webapps/pixelfed or /srv/http/pixelfed or wherever else you feel like. i think the arch-specific installation instructions have been removed by some commit, but i'll transfer this issue to the docs repo for when docs are next updated.

trwnh commented

Will be fixed in next commits; Arch guide will now use /usr/share/webapps in keeping with Arch guidelines on how to package webapps.