Research-IT-Swiss-TPH / pdf-form-filling-api

API to read, fill and flatten PDF forms.
https://143.198.242.211.sslip.io/
0 stars 2 forks source link

Permission issues with storage directory #40

Closed tertek closed 5 months ago

tertek commented 5 months ago

When initializing the container, mounted volumes from Windows will not respect the file permissions on WSL as it seems. There were several cases when after adding files/folders through webserver user (www-data), there was a permission problem when trying to access through Visual Code.

There seems to be a problem with Docker and WSL i.e. Windows volumes: https://github.com/docker/for-win/issues/4824 https://forums.docker.com/t/permissions-issue-writing-to-docker-volume-inside-wsl2-filesystem/129510

A possible workaround could be the creation of a new user group that unites root and www-data groups. But these would need additional setup on the remote server side. https://stackoverflow.com/a/70199699/3127170

Maybe there is another solution, working with WSL metadata, as described here: https://learn.microsoft.com/en-us/windows/wsl/file-permissions?source=recommendations#wsl-metadata-on-windows-files