Nginx APT repo missing public key

I recently had some issues getting NginX to update though apt. Here is what I did to fix the problem I was having.

W: GPG error: wheezy Release: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY ABF5BD827BD9BF62

Run the following commands

cat nginx_signing.key | sudo apt-key add –
apt-get update

Password required to delete files in Mac OSX

I recently had a problem after upgrading to a new Macbook Pro. Deleting files required me to enter my password every time.

The problem started after I had manually copied a few files across to the new Mac running OSX Mavericks. Only these copied files were affected by the problem. After some mucking around, I worked out what the issue was.

Read More

Phone Apps: A time waster?

You might have noticed that over the last few weeks, I’ve been looking at ways I can improve the way I work  in an attempt to be more productive. Last week, I shared a little about using accessible document storage to improve the way you share information.

Read More

atd[000000]: File is in wrong format – aborting

Recently, on my CentOS server, I had my system error log at /var/log/messages flooded with a whole heap of lines like the one below.

server01 atd[13653]: File a0001001567d06 is in wrong format – aborting

Naturally, this continued until the server ran out of disk space and died. I couldn’t work out how the issue actually originated however, I managed to fix the issue by deleting the at job that was failing.

The following commands fixed the problem for me.

First of all use atq to find out the job number.

# atq a0001001567d06

You should get a response similar to the one below. The first number is the job number you need to run the next command.

16 2012-09-04 00:38 a root

Using the job number from above, run atrm to remove the troublesome job

# atrm 16
Problem solved!

Loading .bashrc on Mac OSX

Earlier this week, I went to setup aliases on Mac OS X (Mountain Lion) and couldn’t get the terminal to read the .bashrc file. It turns out that Mac OSX loads .bash_profile instead of .bashrc.

So I spent some time searching and found out that OSX will check a few files for additional shell config

~/.bash_profile, ~/.bash_login, and ~/.profile

Note: The files are also read in the order above. If you have a .profile file and a .bash_profile, the .profile config will be ignored.

I’m used to using .bashrc for everything so to get around my habit, I just added the following lines to .bash_profile.

if [ -f ~/.bashrc ]; then
    source ~/.bashrc

Now, I just carry on like I always did!

I’m sure that the same .bashrc fix will apply to Lion and Snow Lepord as well.