Singapore Flyer

Thursday, March 13, 2014

How to disable bug search without login to bugzilla

I have a bugzilla account, which only authorized users can login and add bugs. Public have no rights to post a bug, edit or comment. But public have privellage to search the bugs.

This is because end users when adding bugs they have to enable an option “Only users in all of the selected groups can view this bug” to restrict the view from public.

Solution : Login as admini user, Navigate to Administration, Parameters, User Authentication
Change the value of requirelogin to On.

Wednesday, March 12, 2014

How to change time zone in ubuntu12.04

Friends,

While checking my box, i came to know that my time/date is UTC zone. I would like to change the time zone to IST.

In command prompt, i logged in as root

dpkg-reconfigure tzdata

It will ask the zone which you needed, change it.

Check the new time zone by issuing the command date, you can see the result.

Friday, March 7, 2014

Cron job to run every second

I need a Cron job to run every second

* * * * * /mnt/scripts/permission.sh >> /dev/null 2>&1
* * * * * sleep 1; /mnt/scripts/permission.sh >> /dev/null 2>&1
* * * * * sleep 2; /mnt/scripts/permission.sh >> /dev/null 2>&1
* * * * * sleep 3; /mnt/scripts/permission.sh >> /dev/null 2>&1
* * * * * sleep 4; /mnt/scripts/permission.sh >> /dev/null 2>&1
* * * * * sleep 5; /mnt/scripts/permission.sh >> /dev/null 2>&1
* * * * * sleep 6; /mnt/scripts/permission.sh >> /dev/null 2>&1
* * * * * sleep 7; /mnt/scripts/permission.sh >> /dev/null 2>&1
* * * * * sleep 8; /mnt/scripts/permission.sh >> /dev/null 2>&1
* * * * * sleep 9; /mnt/scripts/permission.sh >> /dev/null 2>&1
* * * * * sleep 10; /mnt/scripts/permission.sh >> /dev/null 2>&1
like this we need to give till sleep 59

Monday, March 3, 2014

apt-get install gives 403 Forbidden on Ubuntu 12.04 LTS EC2 Instance

For some of the package installation using apt-get i am getting 403 Forbidden error.

root@ip-172-32-14-23:~# apt-get install php5-gd
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  fontconfig-config libfontconfig1 libgd2-xpm libt1-5 libxpm4 ttf-dejavu-core
Suggested packages:
  libgd-tools
The following packages will be REMOVED:
  libgd2-noxpm
The following NEW packages will be installed:
  fontconfig-config libfontconfig1 libgd2-xpm libt1-5 libxpm4 php5-gd ttf-dejavu-core
0 upgraded, 7 newly installed, 1 to remove and 7 not upgraded.
Need to get 169 kB/2,157 kB of archives.
After this operation, 4,277 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Err http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates/main fontconfig-config all 2.8.0-3ubuntu9.1
  403  Forbidden
Err http://us-east-1.ec2.archive.ubuntu.com/ubuntu/ precise-updates/main libfontconfig1 amd64 2.8.0-3ubuntu9.1
  403  Forbidden
Failed to fetch http://us-east-1.ec2.archive.ubuntu.com/ubuntu/pool/main/f/fontconfig/fontconfig-config_2.8.0-3ubuntu9.1_all.deb  403  Forbidden
Failed to fetch http://us-east-1.ec2.archive.ubuntu.com/ubuntu/pool/main/f/fontconfig/libfontconfig1_2.8.0-3ubuntu9.1_amd64.deb  403  Forbidden
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

FIX :
sudo vi /etc/apt/sources.list
Remove the entries us-west-1.ec2 as prefix:
Add the following in the file

deb http://us.archive.ubuntu.com/ubuntu lucid main multiverse universe
deb http://us.archive.ubuntu.com/ubuntu lucid-security main multiverse universe
deb http://us.archive.ubuntu.com/ubuntu lucid-updates main multiverse universe

sudo apt-get upgrade
Then i done my package installation with out any error
sudo apt-get install php5-gd