Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mounted filesystems not accessible by root #5

Closed
jandubois opened this issue May 15, 2021 · 2 comments · Fixed by #43
Closed

Mounted filesystems not accessible by root #5

jandubois opened this issue May 15, 2021 · 2 comments · Fixed by #43
Labels
bug Something isn't working

Comments

@jandubois
Copy link
Member

I ran limactl start default without adding the hypervisor entitlements to qemu (see #4) and then connected via lima bash. The mounted directories /tmp/lima (and /Users/jan) work as expected for the normal user:

jan@lima-default:/$ ls -l /tmp/
total 24
drwxr-xr-x 1 root root  192 May 15 00:55 lima
drwx------ 3 root root 4096 May 15 00:53 snap.lxd
drwx------ 2 jan  jan  4096 May 15 00:53 ssh-VWQD1U87aO
drwx------ 3 root root 4096 May 15 00:53 systemd-private-193c8c72bfc547b5bd03fbf7a3776fda-systemd-logind.service-BsE9tL
drwx------ 3 root root 4096 May 15 00:53 systemd-private-193c8c72bfc547b5bd03fbf7a3776fda-systemd-resolved.service-cfZvr4
drwx------ 3 root root 4096 May 15 00:53 systemd-private-193c8c72bfc547b5bd03fbf7a3776fda-systemd-timesyncd.service-fAE656
jan@lima-default:/$ touch /tmp/lima/foo

But the root users doesn't seem to have write/execute permission to them:

jan@lima-default:/$ sudo ls -l /tmp/
ls: cannot access '/tmp/lima': Permission denied
total 20
d????????? ? ?    ?       ?            ? lima
drwx------ 3 root root 4096 May 15 00:53 snap.lxd
drwx------ 2 jan  jan  4096 May 15 00:53 ssh-VWQD1U87aO
drwx------ 3 root root 4096 May 15 00:53 systemd-private-193c8c72bfc547b5bd03fbf7a3776fda-systemd-logind.service-BsE9tL
drwx------ 3 root root 4096 May 15 00:53 systemd-private-193c8c72bfc547b5bd03fbf7a3776fda-systemd-resolved.service-cfZvr4
drwx------ 3 root root 4096 May 15 00:53 systemd-private-193c8c72bfc547b5bd03fbf7a3776fda-systemd-timesyncd.service-fAE656
jan@lima-default:/$ sudo touch /tmp/lima/foo
touch: cannot touch '/tmp/lima/foo': Permission denied
@AkihiroSuda
Copy link
Member

I'm planning to replace sshfs with 9p (#1)
This issue will be probably resolved together at that time.

@AkihiroSuda AkihiroSuda added the bug Something isn't working label May 15, 2021
AkihiroSuda added a commit that referenced this issue Jun 11, 2021
Fix #5 , by running sshfs with `-o allow_root`

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
@AkihiroSuda
Copy link
Member

This issue is fixed in Lima v0.2.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants