fvtt-docker icon indicating copy to clipboard operation
fvtt-docker copied to clipboard

Ownership issue with /opt/foundry/resources directory

Open labrown opened this issue 1 year ago • 0 comments

I've been using your excellent docker-compose setup for FoundryVTT for a while now. Just updated my docker images and ran into an issue when I try to start the foundry container:

...
foundry    |   inflating: locales/gu.pak
foundry    |   inflating: locales/he.pak
foundry    |   inflating: unzip: can't open 'resources/app-update.yml': Permission denied
foundry    | locales/hi.pak
foundry    |   inflating: locales/hr.pak
foundry    |   inflating: locales/hu.pak
foundry    |   inflating: locales/id.pak
...

When I exec into the running container I see this:

$ docker exec -it foundry /bin/sh
/ $ ls -l /opt/foundryvtt/
total 420888
-rw-r--r--    1 fvtt     fvtt          1096 Jan 27 05:32 LICENSE.electron.txt
-rw-r--r--    1 fvtt     fvtt       8328249 Jan 27 05:32 LICENSES.chromium.html
-rwxr-xr-x    1 fvtt     fvtt         54256 Jan 27 05:32 chrome-sandbox
-rw-r--r--    1 fvtt     fvtt        127746 Jan 27 05:32 chrome_100_percent.pak
-rw-r--r--    1 fvtt     fvtt        179160 Jan 27 05:32 chrome_200_percent.pak
-rwxr-xr-x    1 fvtt     fvtt       1254728 Jan 27 05:32 chrome_crashpad_handler
-rwxr-xr-x    1 fvtt     fvtt     166000248 Jan 27 05:32 foundryvtt
-rw-r--r--    1 fvtt     fvtt     218337282 Jan 27 05:32 foundryvtt-11.315.zip
-rw-r--r--    1 fvtt     fvtt      10544880 Jan 27 05:32 icudtl.dat
-rwxr-xr-x    1 fvtt     fvtt        252920 Jan 27 05:32 libEGL.so
-rwxr-xr-x    1 fvtt     fvtt       6633192 Jan 27 05:32 libGLESv2.so
-rwxr-xr-x    1 fvtt     fvtt       2877248 Jan 27 05:32 libffmpeg.so
-rwxr-xr-x    1 fvtt     fvtt       4623704 Jan 27 05:32 libvk_swiftshader.so
-rwxr-xr-x    1 fvtt     fvtt       6402632 Jan 27 05:32 libvulkan.so.1
drwxr-xr-x    2 fvtt     fvtt          4096 Jan 27 05:32 locales
drwxr-xr-x    1 root     root          4096 Jan 10 07:25 resources
-rw-r--r--    1 fvtt     fvtt       5313018 Jan 27 05:32 resources.pak
-rwxr-xr-x    1 fvtt     fvtt           390 Jan 10 07:25 run-server.sh

You'll note the resources directory is owned by root with 0755 permissions. That prevents the fvtt user from writing anything into that directory. Since this is a pre-existing Foundry install, things work OK. If this is a new install, then the unzip command trying to load the application into resources/app fails completely.

I will submit a simple PR for this issue.

labrown avatar Jan 27 '24 05:01 labrown