HostedDB - Dedicated UNIX Servers

Securing-Optimizing-RH-Linux-1_2_411
Comments and suggestions concerning this book should be mailed to gmourani@videotron.ca © Copyright 1999-2000 Gerhard Mourani and Open Network Architecture ® 411 [root@deep /]# cp imp-version_tar.gz /home/httpd/horde/ [root@deep /]# cd /home/httpd/horde/ [root@deep horde]# tar xzpf imp-version_tar.gz [root@deep horde]# mv imp-version imp [root@deep horde]# rm -f imp-version_tar.gz NOTE: It’s important that directory “imp” reside inside “horde” directory or Webmail will not work. We remove the tar archive of IMP once we are finished to move the “imp-version” directory of IMP to its new name “imp”. Step 3 Change the “horde” directory and all its subdirectories and files to be owned by the super-user “root” for security reasons. [root@deep /]# chown -R 0.0 /home/httpd/horde/ Step 4 Copy “/home/httpd/horde/phplib/*.ihtml” files to your new “php” directory (/home/httpd/php/) by executing the following commands: [root@deep /]# cp /home/httpd/horde/phplib/*.ihtml /home/httpd/php/ Configure and create Webmail IMP SQL database We must now configure our database to be able to use Webmail IMP with the SQL database. The easier methode is to use some predefined scripts located under “/home/httpd/horde/imp/config/scripts/” subdirectory. For PostgreSQL support follow the simple steps bellow. Step 1 First of all, we must edit the script file “pgsql_create.sql” related to PostgreSQL located under “/home/httpd/horde/imp/config/scripts” subdirectory and change its default value for the username “httpd” run as to be “www”. Edit the pgsql_create.sql file (vi /home/httpd/horde/imp/config/scripts/pgsql_create.sql) and change the line: GRANT SELECT, INSERT, UPDATE ON imp_pref, imp_addr TO nobody; To read: GRANT SELECT, INSERT, UPDATE ON imp_pref, imp_addr TO www; Step 2 Now, we must define the username of Apache named “www” in our PostgreSQL database to be able to create the Webmail IMP database with this username. · To define the username of httpd named “www” in your database, run the  createuser utility program of PostgreSQL: [root@deep /]# su postgres [postgres@deep /]$ createuser Enter name of user to add ---> www Enter user's postgres ID or RETURN to use unix user ID: 80 -> [Press Enter] Is user "www" allowed to create databases (y/n) y Is user "www" a superuser? (y/n) n createuser: www was successfully added