kerberos-io / web

(DEPRECATED) An open source GUI to configure the machinery and to view events that were detected by the machinery.
https://www.kerberos.io
225 stars 69 forks source link

Write permission issue in docker when saving config #159

Open cwjackso opened 4 years ago

cwjackso commented 4 years ago

Describe the bug When saving config through the web UI I get a permission error

To Reproduce Steps to reproduce the behavior:

  1. Go to web ui
  2. Click on settings
  3. Click on update
  4. See following error

Screenshot_20200418-193740

Expected behavior Config is saved

cedricve commented 4 years ago

Interesting will check out myself. Probably because it’s copying the config directory, without setting the appropriate permissions.

On 18 Apr 2020, at 20:41, Carl Jackson notifications@github.com wrote:

Describe the bug When saving config through the web UI I get a permission error

To Reproduce Steps to reproduce the behavior:

Go to web ui Click on settings Click on update See following error https://user-images.githubusercontent.com/12407694/79662062-61007780-81ac-11ea-92ca-e04fd759df2e.png Expected behavior Config is saved

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kerberos-io/web/issues/159, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALZUG2BHOVTMSV3U3RVQDTRNHX7HANCNFSM4MLOWSQA.

cwjackso commented 4 years ago

Haven't fully investigated yet but maybe linked - web hooks have stopped working on motion detection. Recording is still happening just not the hook.

This is since changing to the latest base image (rather then amd-64)

On Sat, 18 Apr 2020, 19:48 Cédric Verstraeten, notifications@github.com wrote:

Interesting will check out myself. Probably because it’s copying the config directory, without setting the appropriate permissions.

On 18 Apr 2020, at 20:41, Carl Jackson notifications@github.com wrote:

Describe the bug When saving config through the web UI I get a permission error

To Reproduce Steps to reproduce the behavior:

Go to web ui Click on settings Click on update See following error < https://user-images.githubusercontent.com/12407694/79662062-61007780-81ac-11ea-92ca-e04fd759df2e.png

Expected behavior Config is saved

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub < https://github.com/kerberos-io/web/issues/159>, or unsubscribe < https://github.com/notifications/unsubscribe-auth/AALZUG2BHOVTMSV3U3RVQDTRNHX7HANCNFSM4MLOWSQA .

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kerberos-io/web/issues/159#issuecomment-615924974, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC6VHDRXYVSQMPSHEPOTXMLRNHYXJANCNFSM4MLOWSQA .

cedricve commented 4 years ago

thanks for reporting, I will have a look.

cedricve commented 4 years ago

@cwjackso can you share the docker command you are running?

cedricve commented 4 years ago

additionally can you show the permissions of the folder you are mounting?

cedricve commented 4 years ago

hmm, make sure your permissions are set correctly. I was able to simulate the error if I set file permissions to 755.

Please set them to 777 to make it work.

Screenshot 2020-04-18 at 21 59 36
cwjackso commented 4 years ago

I have updated to the latest version and this didn't change anything.

Setting 777 permission on the config directory (mounted as a volume via docker compose) has fixed the issue.

Not sure why specifically the config volume needs this though as the logs and capture files all write fine without it, and with the old docker image I never needed had that level of permission.