Does apache always run as root?

Open
#337 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
20/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
apache, docker, php
Domain
backend, security

Research direction

Reproduce the permission scenario in the project’s PHP container, starting with the Apache configuration and process output described in the issue. No source file or test is named; done would be an explanation of why root-owned files with 700 permissions remain writable and whether the Docker setup is responsible.

Written by the indexing model from the issue text.

Description

I've been struggling attempting to get some security checks to pass but apache/php can always write to files in the web directory. I've changed the apache configuration to run as a different user and ps -ef shows that the subsequent apache instances are running as that user. apachectl -S also shows that apache running as the new user.

However, when files in the web directory are owned by root and the permissions are set to 700 apache/php can still write to the files. Is this just some weird docker thing?

Dominant language
Shell
Stars
114
Forks
326
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sclorg/s2i-php-container

All issues in sclorg/s2i-php-container

Similar issues

More Shell/Bash issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.