Synology DS412+ Users Review

screenshot_327

These are my setup notes combined with a user review the Synology DS412+.  We have bought this device so we: can host some websites from home with low bandwidth high storage requirements; have remote access to files etc; and have a shared drive on our LAN rather than leaving our iMacs on;

The SynBox will initially be loaded with 4x Western Digital 1TB drives that we have left over from our down graded Ubuntu server.  I have completed a SmartCtl Extended Test Reports on these drives and hope despite the extended hours they will work ok for the time being.

– post in progress —

DIY Dropbox using WebDav

WebDavToServerConnected

So I’ve long held back from signing into one of the free cloud resources due to concerns over privacy. I’ve used Google Docs for a few non-descripto documents but nothing more. However, having just placed an order for an iPad3, I’m looking to improve my remote working and document management.  I don’t want to be dragging my laptop everywhere with me next year. There is not an iPad app for the ‘new’ Google Drive and writing Google Docs on the iPad just doesn’t work.   Pages, Numbers and Keynote are all apps of notoriety for the right reasons so how can I import/export easily from this?  Bottom line I can’t.  Dropbox allows documents to open into Pages but not the reverse. It appears WebDav is the only option so this is how I’ve set mine up on our home Ubuntu 10.10 server.

Ubuntu Secure Server Setup

So we’ve had need to open a couple of ports on our home-server to the real-world. Its like letting a child out in the evening for the first time alone – you’ve no idea what trouble they might get into but just hope you’ve prepared them enough.

These are my notes for when I forget what I’ve done.

The router is only forwarding HTTP and SSH traffic to the server. SSH has been locked down so it only accepts Key logins from non-root users so I think this is pretty good. The default site forwards via .htaccess to this domain which prevents general rumblings if you find it and only certain external subdomains are identified in the server’s /etc/hosts file.

Denyhosts is installed.

UFW Firewall has been configured using

sudo ufw default deny
sudo ufw allow ssh
sudo ufw allow www
sudo ufw allow 10000
sudo ufw allow 443
sudo ufw allow Samba
sudo ufw allow 5901
sudo ufw enable

Thanks to 1000Umbrellas for the above.

Apparently, its possible to use allow webmin but this didn’t seem to work in this instance.

 

 

CakePHP Console under MAMP

So if you are running MAMP on your Mac and baking some CakePHP you may encounter errors when trying to run the Cake Console.

The error is likely to look something like

Warning Error: PDO::__construct(): [2002] No such file or directory (trying to connect via unix:///var/mysql/mysql.sock) in [/rootpath/lib/Cake/Model/Datasource/Database/Mysql.php, line 160]

Add the following to your database.php config file.

'unix_socket' => '/Applications/MAMP/tmp/mysql/mysql.sock'

jQuery Form Submit fails?

jquery-logo1

Cheeky Jquery fails to auto submit forms sometimes and this is due to the submit button interferring with the .submit(). call.

I found this out when creating an autologin feature for a client. They needed to get username details from clients on their own website, check for authenticity and then if OK create an autologin token and redirect to the suppliers website via a post form.

Outlook 2010 Signatures in HTML

outlook_2007_logo

In the great wisdom of Microsoft they have broken HTML Signatures in Outlook 2010. Well actually that’s not true – they’ve gone backwards 10 years. If you want to show MS your frustration go to http://fixoutlook.org.

Thankfully, developers and IT Geeks world over have sought for a working solution to some of the problems at least. This solution comes via Claudio on Fuel Your Coding.

1) Create your nice html signature file with any html editor.
2) Save it as something.html, then open the same file with MS Word
3) Within Outlook 2010, create a new signature with some name and leave the window open.
4) Go back to Word, where your signature is being displayed, copy and then paste it into the signature editing box in Outlook.

This method certainly appears correct in the email but we are still keeping fingers crossed that the email arrives the other end links and bits intact.

Securing Cakephp Forms including Ajax, JQuery & Security

While building a recent CakePHP solution in addition to securing my forms I needed to use some JQuery-driven Ajax calls. Although on the surface this appeared straight forward the documentation was lacking in the detail required. I wasted alot of time trying different things that didn’t work idependantly but once put together provided what I believe is a working solution. It may need some refinement over time but hopefully this will save others wasting so much time in code-wilderness.