Reputation: 150
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.
Upvotes: 4
Views: 18535
Reputation: 121
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
Upvotes: 2
Reputation: 111
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 ;)
Upvotes: 11
Reputation: 1956
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
Upvotes: -1