How distro specific should the installation guides be?
I want to change the Linux installation guides to recommend setting up a system user instead of a normal OS user. For this, I would need a new working directory for Pleroma, because /home/pleroma/pleroma
will not exist. The thing is: Each distro is putting their webapps in different directories. Arch puts it into /usr/share/webapps/
, Debian in /var/www
, and openSuse into /srv/
if the service is installed by a package manager.
So my question is: How distro specific should the guides be? Should we choose a single folder for all distros? Which folder would that be? /opt/
, /srv
, /var/
, /usr/local/
? Should we use the Debian path for everything, because I guess most admins are running Debian? Or should we use the path recommended by each distro for the respective guide?
I would go for a generic path, because using the right distro specific path would be the job for the person, who is packaging Pleroma for the distro (which I hope will happen, when we have stable releases and don’t need recompilation for configuration changes).
Pleroma is used by many people who are new to admin stuff, so I think that putting deployment best practices into the guides is a good idea.
To be clear what I mean with system user:
- No aging information in
/etc/shadow
- Usual an ID below 1000 (SYS_UID_MIN-SYS_UID_MAX)
- No password
-
bin/false
shell - Home folder in
/var/lib/pleroma
The command for that would be: useradd -r -s /bin/false -m -d /var/lib/pleroma -U pleroma
Managing Pleroma stuff would then be either done by using sudo -u pleroma command
for a single command or sudo -u pleroma $SHELL
to log into the user with the shell of your choice. su pleroma -l -s $SHELL -c 'command'
and su pleroma -l -s $SHELL
as root can be run as an alternative.