(Answer) (Category) Faq-O-Matic Faq-O-Matic : (Category) Administrators' Guide : (Category) Customize :
I want to change the user ID that runs the CGI.
You might want to do this because you don't want your FAQ CGI to run as nobody, or because you want to be able to walk around in the FAQ directories as a user you can log in as (nobody usually has a non-shell). There are a couple ways to do this:

1. Use cgiwrap (http://www.unixtools.org/cgiwrap/). cgiwrap gives you some nice auditing and security features, but it requires being the webmaster to install (or perhaps root?).
2. Set the SUID bit on the CGI stub. (man chmod).

If you've decided to change the user your CGI runs as, you have to convert the data of your FAQ somehow.

1. If your FAQ doesn't have anything of value in it yet, just delete it and reinstall. This is the easiest way, of course.

2. If your FAQ has data you want to preserve, back that data up with tar, then select one of these options:

2.1. Mirroring: Install the new CGI in a new location (as the new user), and use the $mirrorURL function to mirror the old site to the new. Then turn off $mirrorURL to make the new site into a master site, and delete the old CGI to avoid any confusion as to which is the real version. (If you want to keep the same URL the FAQ used to have, this may require one more mirroring step, an alias in the web server configuration, or just some 'mv' commands from the command line.)

2.2. Masochism: Change the CGI to run as the new user. 'chmod' all the files in fom-meta/ and fom-serve/ to be owned by the new user. Re-lock all of the RCS files in fom-meta/RCS/ to be locked by the new user. This option is definitely the most precarious; I would advise mirroring instead.

To relock the RCS files like suggested in point 2.2, you must go to the fom-meta/RCS directory and issue:
 rcs -M -u -q *
(-M = don't send mail when unlocking, -u = unlock, -q = quiet)
then change the ownership of all RCS files to the user you want, then login as or 'su' to the user you want to run FOM from and:
 rcs -l -q *
This will relock all files as the current user.

[Append to This Answer]
Previous: (Category) How can I distribute copies of my FAQ?
Next: (Answer) Using the $pageHeader option on the configuration page
This document is: http://www.jonh.net/cgi-bin/faqomatic/fom?file=341
[Search] [Appearance]
This is a Faq-O-Matic 2.718d.
Hosted by SourceForge Logo and jonh.net.