nextcloud / nextcloud/nextcloud-docker-dev

Setup does not work with Selinux

Open
#487 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
PHP
Stars
190
Forks
103
Avg merge
4h 36m
Merged PRs (30d)
1

Description

How to use GitHub
  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Steps to reproduce
  1. Have a system with selinux enabled (e.g. Fedora)
  2. Clone nextcloud-docker-dev
  3. Run ./bootstrap.sh
  4. Start Nextcloud
    docker compose up nextcloud proxy
    
Expected behaviour

Nextcloud should start and be available at https://nextcloud.local

Actual behaviour

Access to the docker socket is denied (the same probably applies to the mounted nextcloud workspace and apps, but it doesn't get as far to notice).

Workaround

Everything works correctly when disabling selinux globally (sudo setenforce 0), however, this is obviously not a great solution to apply regularly.

Proposed solution

For this use case, I think, the most pragmatic solution would be running the containers with --security-opt label=disabled where needed (i.e. disabling selinux separation for the container, which is still better than doing it for the whole system). I can provide a pull request if desired.

Server configuration

Web server: Apache/Nginx (all of them)

Database: MySQL/Maria/SQLite/PostgreSQL (all of them)

PHP version: 8.5/8.4/8.3 (all of them)

Nextcloud version: all

Contributor guide

Open the contributing guide

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.

Research direction

Start with bootstrap.sh and the Docker Compose definitions used by docker compose up nextcloud proxy; reproduce the failure with SELinux enforcing and inspect the socket and workspace mounts. Done means the development environment starts and Nextcloud is available at https://nextcloud.local without disabling SELinux globally.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, docker-compose, linux
Domain
devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.