Author: sotech

  • Ubuntu: How to check the samba version

    Ubuntu: How to check the samba version

      To check the version of Samba that you are running, use the smbstatus command. The first line is the version, which should look something like:   Samba version 3.6.3   If you want to see just the version without the rest of the smbstatus information, you can run:   smbstatus –version   Much less…

  • New CentOS WordPress install: Error 500

    New CentOS WordPress install: Error 500

      Was asked to troubleshoot a client’s installation technique for WordPress on CentOS 6.x yesterday; they were receiving an Error 500 when they tried to access index.php for the first time. Checking the Apache logs showed:   SoftException in Application.cpp:431: Mismatch between target GID (522) and GID (65531) of file “/home/andrea/public_html/index.php” Premature end of script…

  • Where are the Apache logs in CentOS?

    Where are the Apache logs in CentOS?

      Rather than being in /var/log as you might expect, the Apache logs can be found at:   /etc/httpd/logs   Here you’ll find the usual access, error etc. logs.

  • Where is the crontab in Ubuntu?

    Where is the crontab in Ubuntu?

      If you’re looking to make a copy of a user’s crontab as a backup or just to view it without using the crontab editor, you can locate it at:   /var/spool/cron/crontabs   Each user’s crontab will be in this directory in a file named as their username (e.g. root). If you’re working with a…

  • Ubuntu: Where is the default tmux config file?

    Ubuntu: Where is the default tmux config file?

      This is a tricky one to find, mainly because by default it doesn’t exist. You create your custom configuration file in your home directory in a hidden file like so:   ~/.tmux.conf   …and add your desired configuration changes to that file. So, if you were the user bob, your config file would be…

  • New Mediawiki install produces error “Fatal exception of type MWException”

      Saw this on a new Mediawiki install where all of the optional extensions were selected, LocalSettings.php had been uploaded to the server and that’s as far as it would go.   To fix, open up LocalSettings.php and comment out the line:   require_once( “$IP/extensions/LocalisationUpdate/LocalisationUpdate.php” );   You should now be able to refresh the…

  • Performing a dry run with rsync

      One of the many useful options rsync offers is the ability to do a dry-run – in effect showing you what it would do without actually making any changes. To achive this we use the -n flag, like so:   rsync -n /source /destination   In practice we would likely use the -n switch…

  • Ubuntu: How to restore your files from a tape

      This is just like extracting a regular tar archive:   tar -xvf /dev/[path to tape] [directory or file to restore]   e.g.:   tar -xvf /dev/st0 backups   This will restore the “backups” file/folder to the current working directory. To check your current directory, you can use:   pwd   to make sure that…

  • Ubuntu: How to check the contents of a tape

    Ubuntu: How to check the contents of a tape

      To check the contents of a tape, insert the tape and run the following:   tar -tf /dev/[path to tape device]   e.g.:   tar -tf /dev/st0   Note that typically it’s a zero, not a letter o, at the end.

  • Ubuntu: How to write files to a tape

    Ubuntu: How to write files to a tape

      To put files onto a tape, run the following:   tar -cvf /dev/[path to tape] [file or directory] [file or directory] [file or directory]   An example would be:   tar -cvf /dev/st0 /home/bob   This will back up the user bob’s home directory to the tape, here located at /dev/st0 (a typical location…