https://rancher.com/ logo
Title
a

astonishing-king-54889

03/13/2023, 3:03 PM
Hey, I have some troubles with permissions to mounted folders in Rancher Desktop. I would like to try out this fix: https://github.com/rancher-sandbox/rancher-desktop/issues/1209#issuecomment-1370181132 which mentions making a file in
~/Library/Application\ Support/rancher-desktop/lima/_config/override.yaml:
But I'm on Windows, what would the correct path on Windows be? I think it could be
%appdata%/rancher-dekstop/
but there's no Lima folder in there, should I just create it?
j

jolly-forest-99711

03/13/2023, 4:14 PM
Rancher Desktop only uses Lima on macOS and Linux. Windows uses WSL, so the approach suggested in the issue you linked won't work. There might be a way though... let me investigate
What trouble with permissions on mounted folders are you having, exactly?
q

quick-keyboard-83126

03/13/2023, 7:23 PM
I can update the comment if someone has some content...
­čĹŹ 1
s

straight-vr-2696

03/14/2023, 7:31 AM
If you look here https://docs.rancherdesktop.io/how-to-guides/provisioning-scripts/#windows there are some specifics for windows. I tried it just once to export some env variables and it seemed to work, you could try giving the commands to change permissions
a

astonishing-king-54889

03/14/2023, 7:54 AM
So we have a docker-compose file that mounts several folders from the Windows host into the container. Under docker-desktop the non-root user in that container had write rights to the mounted folder. But under Rancher it only has read rights. But the root user still has rights to allow the other user access. Looks like the issue above doesn't apply. It was a bit of a hail mary anyway.
@straight-vr-2696 did you find which settings you can set via that method?
~Another finding. So if I use the root user inside the image and give the non-root user rights to write to the folder it keeps working fine, even after a complete PC reboot. It stops working when I delete the folder that was mounted on the host (Windows) and recreate the folder. So it does look like there's some interaction there~
So I figured it out. In my docker-compose file I have the following volume:
volumes:
  - ${ROOT_DIRECTIORY}/logs:/opt/something/logs
If the directory
${ROOT_DIRECTIORY}/logs
does not exist on the WIndows Host it gets created when I run
docker-compose up
and it will be owned by the root user inside the container. The non-root user will only have read access to it If the directory already exits on the host. The non root user in the container has write rights I guess there's some difference in how Rancher-Desktop creates the folder on the host as compared to how Docker-Desktop did it
Reading https://stackoverflow.com/a/51471462/445112 hints that it only happens because the folder was mounted outside of the airflow user's home directory.
q

quick-keyboard-83126

03/14/2023, 12:07 PM
That needs to be added to https://docs.rancherdesktop.io/faq/
For the time being, the ticket you found with my comment is a good placeholder
a

astonishing-king-54889

03/14/2023, 12:21 PM
Ok, Ill add te info there!
w

white-xylophone-9961

03/14/2023, 9:49 PM
idk, that still seems wrong to me, the directory or file you intend to mount into the container should already exist.