Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to access because of permission problems #8

Open
lightlike opened this issue Jan 14, 2023 · 4 comments
Open

Unable to access because of permission problems #8

lightlike opened this issue Jan 14, 2023 · 4 comments

Comments

@lightlike
Copy link

lightlike commented Jan 14, 2023

I get a permission error when trying to access the files from from the browser (HTTP 403)

This seems to be because the httpd service cannot access the files.

Created Permissions: rwxrwx---
Needed Permissions: rwxrwxr-x

This should be fixed by either setting the httpd user to PUID and PGID or by executing chmod o+rx /usr/local/apache2/htdocs/*.

@Jafner
Copy link
Owner

Jafner commented Sep 5, 2023

@lightlike Can you reproduce this issue on the current version?
If so, can you share the following information about your environment:

  • Your Docker-compose file
  • The directory ownership of your host-side mount

@lightlike
Copy link
Author

It is still happening with the current image when I set this up from scratch. (The storage I fixed manually works perfectly still)

The compose file:

version: '2'
services:
    5etools:
        container_name: 5etools-test
        environment:
            - SOURCE=GITHUB
            #- OFFLINE_MODE=TRUE
            - TZ=Europe/Berlin
        ports:
            - '8088:80/tcp'
        volumes:
            - '/srv/dev-disk-by-label-DATA0/DockerData/test:/usr/local/apache2/htdocs'
        restart: unless-stopped
        image: jafner/5etools-docker

The permissions of /srv/dev-disk-by-label-DATA0/DockerData/test (output of ls -al, replaced usernames with ids):

drwxrws---+  21 1000 1000   4096  6. Sep 08:08 .

If you need anything else please let me know.

@Jafner
Copy link
Owner

Jafner commented Nov 24, 2023

Are you able to serve that directory with a vanilla httpd or nginx container?

If not, I would look further into the file/directory permissions as the culprit.

If so, I'll take another look at how my script interacts with ownership and permissions.

@lightlike
Copy link
Author

I get the same 403 Forbidden from a static nginx docker with the following config:

version: '2'
services:
  nginx:
    image: nginx
    container_name: nginx-test
    ports:
      - 8088:80
    volumes: 
      - /path/to/5etools:/usr/share/nginx/html:ro

I do not know if this would be overkill but the s6-overlay project tries to remedy those problems by accepting a UID and GID for the service to be run with. (and a lot of other usefull stuff)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants