Docker : directory mapped in volume is not created with same user of host

i’m running a docker container inside my server .

in my server (host) i ve this folder : /opt/myapp/myFolder

where myFolder has 755 permissions and myuser:mygroup ownership

I’m using docker-compose to run my container , thus i’m mounting that same volume

mycontainer:
    ...
    volumes:
    - /opt/myapp/myFolder:/opt/myapp/myFolder
    ...

The probleme that , inside my container , my directory “myFolder” still having the same host permissions (755) but not the same ownership

and the ownership looks like this 65534:65534

this results on permission denied in some other treatment inside this folder.

normally inside the container “myFolder” still keeping the same host ownership .

Note : tthe user myuser and the group mygroup do exist inside the container.

Suggestions ?

Source: StackOverflow