0

I am using Cloud9 IDE on my server, which creates files with default permission 640. As a result when I try to open those file via HTTP, apache shows permission denied error.

When IDE is running as root user, files created belong to root:root. Also, when I see as what user is apache running, all its processes are shown to be running as root user.

I cannot understand why still it cannot access files. I know if I add apache's user to group of file owner, it will work. But, I don't know which user to add.

PS: I don't want to change permission of each file I create. I want less troubling solution.

1
  • which Linux flavor you are using redhat/ubuntu? could you please update the question
    – ZVIK
    Nov 6, 2013 at 8:47

1 Answer 1

0

In your main Apache config you should have two parameters called User and Group. With these you can specify what user, and what group Apache should run as.

Usually you should not run your httpd as root due to security issues. The normal case would be to have a specific user and group for the httpd. For example in Debian the httpd run as www-data:www-data.

Besides user and group you should check your configuration for the specific location. Typically this would be a DocumentRoot, Directory and/or Location parameter. Depending on your Apache version you might want to look into Require (2.4) or Allow (2.2).

Hope it helps you forward.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .