It is not a good idea to use the root MySQL account to do backups. So, let’s create a user dedicated exclusively to doing backups. Log on to MySQL as root: mysql -u root -p Then create the new user
Batch scale images to a particular size
First install imagemagick: sudo apt-get install imagemagick Then CD into the directory containing the images and make a new directory that will hold all the re-sized images. In this case I called it resized: mkdir resized Then run the command
Upgrading to Apache 2.4 will prevent WebDAV listing of directories containing index files
I recently upgraded Apache from 2.2 to 2.4 and among all the expected changes that had to be made to the existing sites-available config files, I encountered an unexpected issue with the WebDAV sites. I could connect to the sites
Force all HTTP traffic to HTTPS
If you have SSL installed and configured on your site, there is a little need to continue serving http traffic over port 80. Performance is no longer a big issue and now Google would reward with better ranking sites that
Unable to create new directories or files (write access) in WebDAV with Apache2
It turns out that if you have enabled mod_rewrite on the server and you are actually doing any url re-writing for the site under which WebDAV is running, then you will not be able to create new directories or files
Block a range of IP addresses from reaching your server
When your Linux server gets bombarded with malicious requests the quickest and easiest thing is to block the offending IP address (or the entire range) using iptables: To block just one IP address: $ sudo iptables -A INPUT -s 103.10.86.53
How to create an ftp user and allow write to the apache root directory with proper permissions
I do not recommend having a set up like this due to the multiple security vulnerabilities that it presents. There are much better and more secure ways to develop and deploy to a server. If you can use WebDAV, scp,
Software Center in Ubuntu 12.04 crashes on startup
Recently the Software Center started crashing on startup. Initially I thought it was due to network issues, but after a further examination it turned out not to be the case. Running it from the panel will not give you any
Remove vim color coding in Ubuntu
By default Ubuntu’s vim utility is configured to color code certain keywords, comments, extensions, etc. I personally do not like this. So I just disable that feature. And while I am at it, I also enable the ruler, which displays
How to enable the ath9k wireless driver on Ubuntu Lucid (10.04)
Ath9k is the latest wireless driver for the newer Atheros chipsets and just like the MadWifi driver could be used to put your NIC in a promiscuous mode, do packet injection, etc. in order to crack WEP. Check the compatibility