How to encrypt php folder under /var/www?

Posted by sirchaos on Ask Ubuntu See other posts from Ask Ubuntu or by sirchaos
Published on 2012-10-16T01:03:30Z Indexed on 2012/10/16 17:21 UTC
Read the original article Hit count: 332

Filed under:
|
|
|

I need to encrypt the folder /var/www/test.

The folder contains PHP files. The goal it to prevent any user to read the php content AND if the HD is mounted on another computer, the /var/www/test should be encrypted AND if computer booted up without any user logged I would like anyone to be able to access data in /var/www/tests.

What is the correct approach for this?

I've tried "ecryptfs-setup-private" as advised in How to encrypt /var/www? yet it didn't work for me. I've might missed something - I've tested the folders while booting with ubuntu 12.04 installation disk and mounted the drive, than I was able to access /var/www/test content.. yet this is what I want to prevent.

The gnome-encfs isn't the way to go since its decryption happens when users logs on to the system & I would like the system to be working after power failure etc' without any one logged in.

Please advice.

© Ask Ubuntu or respective owner

Related posts about apache

Related posts about encryption