pducharme / UniFi-Video-Controller

Docker for Unifi-Video Controller (Ubiquiti Networks)
199 stars 105 forks source link

Permission Denied #77

Closed Mellowevo8 closed 6 years ago

Mellowevo8 commented 6 years ago

Newbie here and looking for guidance, very new to docker file and container station. Purpose to is to run unifi-video on a QNAP TS 453a NAS through container Station. I have successfully install a unifi controller and is working. Issue i have created the docker, when it tries to start i get permission denied. See image below image 1

these are my network settings image2

any guidance what I'm not doing will be great...

fryfrog commented 6 years ago

You might need whatever --cap-add gives mount permissions, the README.md should be a good example.

bdfoster commented 6 years ago

Having this same issue since I upgraded to v3.9.3 and running it on Ubuntu with the docker daemon. Can't get to a shell since it's constantly in a restart state. All capabilities added, apparmor taken care of, etc. Been running it for at least 6 months without issue until now.

fryfrog commented 6 years ago

Can you show your full docker run command?

Mellowevo8 commented 6 years ago

How do you run the command when i'm unable to access the terminal?

fryfrog commented 6 years ago

@Mellowevo8, you'll need to explore how QNAP does Docker stuff. Their support forums or documentation should show how you can see the run command. How do you fill in the volumes needed?

fryfrog commented 6 years ago

Been awhile, closing.

acantril commented 6 years ago

I'm having the same issue .... Constant spams of

2018-05-29 22:49:54.295409 [warn] PUID not defined (via -e PUID), defaulting to '99'

2018-05-29 22:49:54.317475 [warn] PGID not defined (via -e PGID), defaulting to '100'

2018-05-29 22:49:54.343246 [info] Permissions already set for volume mappings

mount: permission denied

Starting unifi-video... failed. in the event logs.

fryfrog commented 6 years ago

Did you review this issue? There were suggestions made, but the OP never came back to update. Let us know what you've tried.

acantril commented 6 years ago

I've tried running with different users passed into the container - defaults & my own users I've tried creating a user with the same UID as the defaults, so UID 99 - still errors. I've tried with completly open host permissions on the volume folders 777 even I've tried not using host mapping for volumes - i.e allowing docker to create volumes for the container, the error still persists.

acantril commented 6 years ago

I can test anything you want me to .. if you have suggestions. There is another issue open with the same error.

fryfrog commented 6 years ago

Show us your docker run command. I don't think this is a literal permissions issue, I think you need a docker permission that allows mounting. The README.md has all the suggested arguments, so you need to figure out what QNAP is giving it and how, then fix that.

None of us have QNAP devices, so we don't know what that might look like.

acantril commented 6 years ago

I'm not using a QNAP ... i'm using an Ubuntu LTS box running docker & compose.

fryfrog commented 6 years ago

Ah, awesome! So what is your docker run command? Are you using the compose file in this project? I don't think either @pducharme nor myself use it, so it could just be wrong in some way.

acantril commented 6 years ago

No, so I've tried to emulate the docker run command the project has via the following compose.

 unifivideo:
    container_name: unifi-video
    restart: always
    image: pducharme/unifi-video-controller
    volumes:
      - /home/$USER/docker_files/unifivideo/data:/var/lib/unifi-video
      - /home/$USER/docker_files/unifivideo/videos:/var/lib/unifi-video/videos
    environment:
      - TZ="Australia/Brisbane"
    ports:
      - "1935:1935"
      - "7444:7444"
      - "7447:7447"
      - "6666:6666"
      - "7442:7442"
      - "7004:7004"
      - "7080:7080"
      - "7443:7443"
      - "7445:7445"
      - "7446:7446"
acantril commented 6 years ago

I've tried passing in user and group as suggested, that doesn't alter anything.

fryfrog commented 6 years ago

What about the two cap-add commands?

        --cap-add SYS_ADMIN \
        --cap-add DAC_READ_SEARCH \

Which are also in the example docker compose file from this project: https://github.com/pducharme/UniFi-Video-Controller/blob/master/docker-compose.yaml

acantril commented 6 years ago

I may have been a moron though ... stand by :)

acantril commented 6 years ago

Confirmed, im an idiot - was the two capabilities i'd missed. Many THanks