vmhgfs-fuse 权限被拒绝问题

dai*_*isy 9 vmware shared-folders

我需要 root 用户和 www-data 用户都可以访问 vmhgfs。

作为 root,我vmhgfs-fuse .host:/ /mnt/hgfs/在 rc.local 中运行命令

但是,网络服务器无法读取共享文件夹。所以我检查了它的许可,

www-data@ubuntu16:~$ ls /mnt/ -lh
ls: cannot access '/mnt/hgfs': Permission denied
total 0
d????????? ? ? ? ?            ? hgfs
www-data@ubuntu16:~$
Run Code Online (Sandbox Code Playgroud)

(如果 /mnt 的权限是 777)

我不知道发生了什么。看起来像内核问题。它从未发生在 Ubuntu 14.04 中,现在在 16.04 和 kernel 中4.4.0-21-generic,它变成了这样。

PS 如果我使用www-data帐户挂载 hgfs ,则它可以由 访问www-data,但不能由 root 用户访问。

dai*_*isy 11

解决。使用allow_other选项授予访问权限

vmhgfs-fuse -o allow_other .host:/ /mnt/hgfs
Run Code Online (Sandbox Code Playgroud)