SeaMonkey run non-root, setup-client simplified
To setup an application to run non-root, that is, as its own user, for example SeaMonkey to run as user "seamonkey", the script /usr/local/clients/setup-client is called. I have completely rewritten that script, reducing it from 1,171 lines down to just 303 lines.
The script had grown over time and become very messy. Now it is very simple.
What prompted this rewrite, is I want to change SeaMonkey to run
non-root. SeaMonkey is builtin to EasyOS 7.x, but runs as the root
user. For security, want to run it non-root, except that my
personal preference is to run the Composer module as root user.
Furthermore, I want the Mail and Address Book modules to run as user "seamonkey" but also want the mail to reside at /files/apps/seamonkey, not in the default /home/seamonkey.
Having the mail and address-book data out of the session, permanently saved in the working-partition, has advantages. It can easily be copied elsewhere, and backed-up. And of course, if you chose to encrypt the folders at first bootup, then /files is encrypted. So even though the mail is stored in plain text files, it is not accessible.
There is another security feature of /files/apps/seamonkey; other apps that run as their own user, cannot even see into that folder; it is completely private to the SeaMonkey mail and addressbook modules.
When I considered the requirements for SM, to run the mail and
addressbook modes with a custom profile path, the browser and chat
modules with the default profile path, and the edit (Composer)
module as the root user, I realised that the setup-client script
is already too complex. So sat down this evening, for several
hours, and did a complete rewrite.
Tags: easy