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

Permission denied #80

Closed
ACCGAGTT opened this issue Mar 6, 2023 · 6 comments
Closed

Permission denied #80

ACCGAGTT opened this issue Mar 6, 2023 · 6 comments
Assignees
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@ACCGAGTT
Copy link

ACCGAGTT commented Mar 6, 2023

When trying to attach volumes , both docker and docker compose options throw the following error:
docker run -p 8081:80 --name mycamera -v $(pwd)/config:/home/agent/data/config -v $(pwd)/recordings:/home/agent/data/recordings-d --restart=always kerberos/agent:latest
{"level":"fatal","msg":"Problem creating a file: open ./data/config/.test: permission denied","time":"2023-03-06T05:54:22+01:00"}

when launching without mounted volumes the container comes up

@cedricve
Copy link
Member

cedricve commented Mar 7, 2023

hello @ACCGAGTT, make sure the permissions of the mounted directories (on your host system) are open enough to be consumed by the docker container (Kerberos Agent).

@cedricve cedricve self-assigned this Mar 7, 2023
@cedricve cedricve added help wanted Extra attention is needed question Further information is requested labels Mar 7, 2023
@Hooch76
Copy link

Hooch76 commented Mar 7, 2023

My Linux knowledge is limited but I was running into the same issue the day before.
The user running the container is:
uid=100(agent) gid=101(kerberosio)

I was able to solve it by changing ownership and permissions on the mounted directory on the host (using bind mounts):

chmod -R 755 kerberos-agent/
chown 100:101 kerberos-agent/ -R

This might not be the best solution but worked for me and might give you an idea about fixing it in a better way ;-)

@cedricve
Copy link
Member

cedricve commented Mar 7, 2023

Thanks for helping out @Hooch76 !!

@ORIOLESFan02
Copy link

My Linux knowledge is limited but I was running into the same issue the day before. The user running the container is: uid=100(agent) gid=101(kerberosio)

I was able to solve it by changing ownership and permissions on the mounted directory on the host (using bind mounts):

chmod -R 755 kerberos-agent/
chown 100:101 kerberos-agent/ -R

This might not be the best solution but worked for me and might give you an idea about fixing it in a better way ;-)

Apologies for this, but I don't understand this. There's no file called kerberos-agent/ for me. Where are you doing this, and does the file name have to be called kerberos-agent/?

@cedricve
Copy link
Member

@ORIOLESFan02 the kerberos-agent/ directory is on the host system, and can be whatever name you prefer. @ACCGAGTT and @Hooch76 have created their own directory, kerberos-agent/ on the host system, give it the required permissions and then inject it into the container.

docker run -p 8081:80 --name mycamera -v $(pwd)/config:/home/agent/data/config -v $(pwd)/recordings:/home/agent/data/recordings-d --restart=always kerberos/agent:latest

@HDTS1
Copy link

HDTS1 commented Jun 27, 2024

How is this closed? I dont understand who should own the files. 100 and 101 are totally different users on my system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

5 participants