Migrating Linux from HDD to an SDD

Note: while the process worked well for me, this post is not meant to be a tutorial, but rather a personal journal documenting the steps I took. Follow at your own risk!

There are plenty of tools for carbon-copying a full linux install to another drive, but this requires that the target drive be larger than the source drive. What happens when you want to migrate to a smaller drive? In my case, I had plenty of free space on my source HDD, so the smaller size of the SDD wasn’t an issue, and I wanted speed. Linux is pretty resilient, so the cp command and some grub magic is all you need to migrate your installation to a new disk.

Continue reading

Read Only & Jailed SFTP Access

While FTP servers are the standard for bulk hosting, they are being phased out in favor of more secure—and less ancient protocols. I decided to create an SFTP server instead, and while SFTP (SSH File Transfer Protocol) is sometimes confused with FTPS (FTP Secure), they are very different beasts. SFTP is akin to the command line too scp, and is controlled by SSH and configured in the ssh configuration files.

I wanted to create a user that only had access to their home directory (in this case, /var/sftp, I don’t want /home to be cluttered), and I wanted to bind my media collection to said home directory. I want it to be read only, and I don’t want the user to be able to SSH in.

The following procedure did the trick:

Continue reading

Hello world!

Yeah, yeah. I’ll get to it.