【问题标题】:How to change permission of vmware's shared folder如何更改vmware共享文件夹的权限
【发布时间】:2016-10-18 16:41:45
【问题描述】:

我在 vmware 播放器上使用 ubuntu 16.04。共享文件夹已启用并且在 /mnt/fghs 上可见。但是,所有者(root)不能被 chown 更改。如何改变它?请给我建议。

另外,有人说修改/etc/fstab后可以更改所有者。但是,我在 /etc/fstab 中找不到任何信息,例如 .host :/ /mnt/hgfs vmhgfs defaults 0 0。当我将该行添加到 /etc/fstab 文件时,wmware 无法启动。

【问题讨论】:

  • 已解决。我猜这个问题是因为 vmware 工具版本。

标签: permission-denied chown vmware-player


【解决方案1】:

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

vmhgfs-fuse -o allow_other .host:/ /mnt/hgfs

unix.stackexchange.com: vmhgfs-fuse-permission-denied-issue

【讨论】:

    【解决方案2】:

    可能有点晚了,但无论如何。

    首先,卸载您的共享文件夹:

    sudo umount /mnt/hgfs
    

    然后运行:

    vmhgfs-fuse .host:/ /mnt/hgfs -o uid=1000 -o gid=1000 -o umask=0033
    

    您应该考虑将uidgid 更改为您的。请记住:

    id -u
    id -g
    

    将返回您当前的用户和组 ID。

    查看vmhgfs-fuse --help 了解更多选项;)

    【讨论】:

    • vmhgfs-fuse .host:/vmware-share-folder-name /myMountLocation -o uid=1000 -o gid=1000 为我工作。如果没有 umask,它只会将所有内容设置为 777。
    • @etech 提到 - 参数 umask=0033 定义访问权限(在八进制模式下),掩码指定不允许的内容。
    【解决方案3】:

    你可以试试those steps

    sudo su
    touch /bin/remount_hgfs
    chmod a+x /bin/remount_hgfs
    echo '#!/bin/sh -e' >> /bin/remount_hgfs
    echo 'umount /mnt/hgfs' >> /bin/remount_hgfs
    echo 'mount /mnt/hgfs' >> /bin/remount_hgfs
    echo '.host:/ /mnt/hgfs vmhgfs rw,ttl=1,uid=33,gid=33,nobootwait 0 0' >> /etc/fstab
    line=`wc -l /etc/rc.local | cut -f1 -d' '`; sed -i "${line}ish /bin/remount_hgfs" /etc/rc.local
    reboot
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2022-11-22
      • 1970-01-01
      • 2021-07-23
      • 2013-10-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多