Monday, October 24, 2011

allowing public access to amazon s3 bucket

You might need to give public access to bucket contents, for example if you use the bucket to load images for your site. Simple GUI option supplied by Amazon only gives access for a specific files but if you need a whole bucket, you have to use policy.

To edit policy, in GUI go to
'Bucket => Properties => Add Bucket Policy'

And add for example (just change yourbucketname with the name of your bucket:
    "Version": "2011-10-24",
    "Statement": [
            "Sid": "AddPerm",
            "Effect": "Allow",
            "Principal": {
                "AWS": "*"
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::yourbucketname/*"
save it and policy is applied.

Provided by:SiQ systems, Cloud experts

Monday, May 23, 2011

Upgrading PHP in CentOS 5

CentOS 5.x comes with PHP 5.1, this version is outdated and you probably would want to upgrade it. I used Atomic repository.
You can add it by running following command:
wget -q -O - | sh
Now you can update PHP:
yum update php
yum update php-mcrypt
(you might also need to update mysql)
Verify version of running PHP:
php -v
And that all modules working as order:
php -m
Restart Apache, you are all set.

Provided by:SiQ systems, Cloud experts

Sunday, May 22, 2011

"SQL Error: 13: Can't create/write to file" on other then /tmp directories (apparmor)

If you get SQL Error: 13 after changing tmpdir parameter in you my.cnf first check permissions in a new directory. If permissions are correct you might be having an issue with AppArmor. AppArmor is a GNU security module for the Linux kernel and it might prevent MySQL from writing to the new directory.
Run: aa-status
To verify if it`s on. If so you will get something like:
profiles are loaded
profiles are in enforce mode
Edit this file:
and append your new temp directory in the end.
/usr/sbin/mysqld {
/new_tmp/ r,
/new_tmp/* rw,
Reload AppArmor with:
/etc/init.d/apparmor reload
Thats it.

Thursday, April 07, 2011

How to update an auto scale launch configuration in Amazon EC

In order to update existing auto scale launch configuration in Amazon EC you need to create a new launch configuration using as-create-launch-config and then assign it to launch configuration using as-update-auto-scaling-group

Provided by:SiQ systems, Cloud experts

Powered by 123ContactForm | Report abuse

Mounting S3 bucket as a file system on Linux (Ubuntu)

In order to mount S3 bucket on Linux you need to install ssh file system (FUSE) libraries first.
Install: aptitude install build-essential libcurl4-openssl-dev libxml2-dev libfuse-dev comerr-dev libfuse2 libidn11-dev libkadm55 libkrb5-dev libldap2-dev libselinux1-dev libsepol1-dev pkg-config fuse-utils sshfs
Follow the instantiations in S3fs WIKI:
It was using http download, not SVN.
Create a mount point for the new file system (ex. mkdir /mnt/s3)
Mount the file system:
ex.: s3fs tmpname -o use_cache=/tmp -o allow_other /mnt/s3
this mount comes with option of using a tmp as a cache for S3 content, you can clean that cache as you feel fit.

You can also add your bucket to /etc/fstab

s3fs#mybucket /mnt/s3 fuse allow_other,url= 0 0

Update for mounting S3 bucket on CentOS 5.5 and other old distros.
CentOS 5.5 comes with old FUSE version 2.7.4 as latest in it`s repository.
You need to manually compile version 2.8.4 befor you can use S3fs.

Remove old FUSE
yum remove fuse fuse* fuse-devel

Install needed libraries:
yum install gcc libstdc++-devel gcc-c++ curl curl* curl-devel libxml2 libxml2* libxml2-devel openssl-devel mailcap

Download new FUSE from the Sourceforge:
wget ""

Untar and compile:

tar -xzvf fuse-2.8.4.tar.gz
cd fuse-2.8.4
./configure --prefix=/usr

make; make install

Configure FUSE in the system:
export PKG_CONFIG_PATH=/usr/lib/pkgconfig:/usr/lib64/pkgconfig/
modprobe fuse

Confirm that 2.8.4 is the version of FUSE displayed :
pkg-config --modversion fuse

Proceed with regular S3FS installation.

Have questions? Just contact us right away and we will be happy to assist

Forthscale is an AWS solution provider

Tuesday, January 04, 2011

Clearos, OpenVPN and mutiwan issue

Just had some problems running OpenVPN in mutiwan mode on ClearOS 5.2 SP1.
Sometime connection got dropped down and user could not reconnect. Problem was solved then i disabled on of the multiwan NICs. What fixed the problem was setting OpenVPN to work in TCP mode instead of UDP. I guess packets were sent using wrong NIC on UDP based connections.
Edit /etc/openvpn/clients.conf
and set "proto tcp"

Provided by:SiQ systems, Cloud experts