Linux

File permissions on html server (recursive chmod) differentiating between files and directories

I recursively screwed up the file permissions in my html servers root directory. To fix it I needed to deploy some "advanced" chmod settings. Obviously I want to treat directories and files differently. I didn't come up with a better solution than the following:

chmod -R u=rw-x,g=rw-x,o=r-wx *
chmod -R a+X *

How to access encrypted volumes from live CDs

Once you have decided to encrypt your hard drive, you might find yourself in the situation where you need to pull off data from it when the regular decryption mechanisms you use are not in place. E.g. when the OS is not booting or the drive has some physical problems. In that case you need to boot from a CD/DVD that supports the encryption technology that you used. In my case I need a live Ubuntu CD/DVD, preferably the same version that was used to encrypt the disk! Otherwise there might be incompatibilities:
sudo apt-get install lvm2 cryptsetup

Pages