4

I'm using ubuntu 16.04 on vmware player. The shared folder is enabled and is visible on /mnt/fghs. But, the owner(root) can't be changed by chown. How to change it? Please, advice me.

Additionally, some person said the owner could be changed after modifying /etc/fstab. But, I couldn't find any information in /etc/fstab like .host :/ /mnt/hgfs vmhgfs defaults 0 0. When I add the line into /etc/fstab file, wmware can't be start up.

Jang
  • 150
  • 1
  • 2
  • 10

3 Answers3

10

probably a little bit late, but anyway.

Firstly, unmount your shared folder:

sudo umount /mnt/hgfs

then run:

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

where you should consider change uid and gid to yours. Remember that:

id -u
id -g

will return your current user and group ID.

Take a look to vmhgfs-fuse --help for more options ;)

gilsoriano
  • 101
  • 1
  • 4
  • 2
    `vmhgfs-fuse .host:/vmware-share-folder-name /myMountLocation -o uid=1000 -o gid=1000` worked for me. Without umask, it just sets everything to 777 it seems. – etech Jan 05 '17 at 17:37
  • as mentioned by @etech - parameter **umask=0033** defines access-permissions (in octal mode), mask specifies what is not permitted. – Alex Aug 29 '19 at 14:09
  • For me, additional parameter `-o allow_other` is needed to work correctly – ckf104 Dec 16 '22 at 14:32
1

Resolved. Use allow_other option to grant access.

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

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

yorkyer
  • 91
  • 1
  • 2
-1

You can try 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
pocheptsov
  • 1,936
  • 20
  • 24