0

First of all, I wouldn't be able to do anything without you! I've been lurking for so long time and have ALWAYS been able to find an answer to my issues. Not this time. I've tried my best to search, sorry if it has already been answered.

To the point:

I'm trying to get a Raspberry Pi to run a Simple Machines Forum, and I got that setup just fine. The next thing I want to do is encrypt both my DocRoot and MySQL database located at /var/www and /var/lib/mysql. I have built and compiled truecrypt in order to accomplish this. I have then created an encrypted container with

truecrypt --create

I then copied the contents of my DocRoot (/var/www) to a temporary location and mounted the truecrypt container at /var/www

Next I copied the contents from the temporary location back into /var/www.

Problem is that when I start apache2 and direct my browser to 127.0.0.1 I get the 403 permission denied error page. I can easily do

cat /var/www/index.php

to verify that it is not damaged in any way. I can even do this without sudo. I tried to

sudo chmod 0777 -R /var/www

Also with 0755 and +x, neither worked. Then I tried to chown /var/www recursively to the user www-data.

sudo chown -R www-data /var/www

This returns a long list of Operation not permitted for the files. Then I tried to check the output from lsattr

lsattr /var/www

This returned "Inappropriate ioctl for device while reading flags" for all the files. Also I can't use chattr to change anything

Any help would be much appreciated! Thanks

1 Answers1

0

Okay I solved it:

It seemed like I couldn't chown anything on a device with filesystem FAT, so I made a new truecrypt container of the filesystem ext2.

Then I ran the chmod and chown as prescribed in the question, and everything ran just fine.