Notes about Linux (Gentoo) - Web

(Or, back to main notes index)



  • The cgi scripts are located under /var/www/localhost/cgi-bin/
  • If you are using apache and get an error saying something like "Permission denied: access to / denied" it's because the unix file permissions don't allow access to the directory and/or file. Start by setting the permissions to the files and directories using chmod -R 777 yourdirorfile and then if you're now able to access it, start re-restricting the access (e.g. chmod 700 yourdirorfile).
  • Modify width of the edit form in pmwiki - quick and dirty solution: change in the file forms.php the entry e_cols.
  • Use Aide (or tripwire) to check for the integrity of your server.
Commands are:

aide --init:
Creates the initial database with the checksums for the files specified in /etc/aide/aide.conf.
After the previous command completes, take a copy of the database and of the config file on your removable device and delete them from the server. This way an attacker won't know what you're monitoring nor will be able to change checksums in the DB if he alters some executables. This command might create a DB in the form of e.g. data.db.new (have a look at the settings in the config file).

aide --check:
Before running this command eventually rename data.db.new into some other name - refer to the config file. This will hashes of the real files against the values stored prevously in the DB.

aide --update:
After checking the report generated by the previous step and eventually having modified the config file to report less garbage, run this command to recreate the "snapshot" of the current system. Again, after that's done copy the DB + config file to your removable media and delete the originals.
  • To clean up the whole Postfix mail queue issue the command...
    postsuper -d ALL deferred
...or just "postsuper -d ALL" to clean up all queues.
  • Some Apache2-links:
  • If when installing Joomla you get an error saying...
    PHP mbstring function overload is set. This can be turned off locally by entering php_value mbstring.func_overload 0 in your .htaccess file.
...you might have to set that value using "php_admin_value" and not "php_value", and setting it in ".htaccess" won't work anymore for recent versions of Apache (I am using 2.2.15). You will have to add the line...
php_admin_value mbstring.func_overload 0
...to your vhost configuration, in the section "Directory" or "Location".