Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running LAMP on Ubuntu 8.04. Apache's username and group are www-data. I put my connection details and AES key in a file in a directory that's not web served. I chown-ed the files to www-data:www-data and set the permissions to 700. Still, the script that require()s these files will only run if I chmod the files to 755. What am I missing?

share|improve this question

migrated from Mar 21 '10 at 14:55

This question came from our site for professional and enthusiast programmers.

belongs to server fault. – Omry Mar 21 '10 at 14:26

Apache on ubuntu runs as root, they only use www-data to read, for several reasons, Yes it should be 755 if the key-file were outside the apache docroot.(default /var/www)

share|improve this answer

Double-check what user Apache is running as, it may not be www-data.

ps aufx | grep httpd

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.