Encrypt a folder in Windows 7 but allow program access

1

I am a web developer and I sometimes develop websites on my laptop that include confidential client information. I can turn on encryption for the relevant folders but when I do, my local Apache server is no longer able to access data in the encrypted folders. How do I allow Apache to access the encrypted data without compromising the encryption?

Tamlyn

Posted 2011-07-08T10:46:11.380

Reputation: 280

What encryption do you use? – cularis – 2011-07-08T11:00:39.090

Answers

2

All software, including Apache server is running under a user account. The specific user account limits the rights of software to access resources such as files or the network. Some "user" accounts are internal to Windows, though, and do not represent human users. Apache will likely run under such an internal account.

When you encrypt a file in Windows, you typically also restrict access to your own user account. As a result, other user accounts cannot access it anymore. Since Apache doesn't run under your user account (it works while you're not logged in, after all), Apache cannot access your encrypted files.

One easy solution is to turn on whole-disk encryption. This should be the default for laptops anyway; they're just too vulnerable to theft, loss, etc. You'll need a password to boot your laptop, but once it's booted the disk remains accessible to all software including Apache.

MSalters

Posted 2011-07-08T10:46:11.380

Reputation: 7 587

2

Another solution should be:

If you are using windows EFS and starting Apache as a service, you will need to do the following:

  • go to Services and find the Apache service
  • stop the service
  • right-click -> properties -> LogON TAB
  • check "This account"
  • fill your windows account name eg. ".\username"
  • provide your password
  • start the service

The Apache service should now see the files.

Khamyl

Posted 2011-07-08T10:46:11.380

Reputation: 21