5etools-docker icon indicating copy to clipboard operation
5etools-docker copied to clipboard

Unable to access because of permission problems

Open lightlike opened this issue 2 years ago • 4 comments

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/*.

lightlike avatar Jan 14 '23 21:01 lightlike

@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

Jafner avatar Sep 05 '23 23:09 Jafner

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.

lightlike avatar Sep 06 '23 06:09 lightlike

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.

Jafner avatar Nov 24 '23 23:11 Jafner

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)

lightlike avatar Nov 25 '23 14:11 lightlike