VMware Communities
babakin34
Contributor
Contributor

How to change mounted linux directory owner of a VMWare shared folder?

My host OS is Windows 10, my virtual machine is Ubuntu Mate 16.
VMWare version is 12.5.
The mount path looks like this: /mnt/hgfs/{mysharedfolder}.
And it is set to 'root' user/group per default. I want to change it to 'www-data'.

The problem is that none of the proposed methods on internet are working to change the ownership of the shared folder. Apparently with the latest version something changed.

These are what I tried so far:

  • under 'etc/init.d' I edited the 'vmware-tools' file:

# Mount all hgfs filesystems  vmware_mount_vmhgfs()

{

  if [ "`is_vmhgfs_mounted`" = "no" ];

    then if [ "`vmware_vmhgfs_use_fuse`" = "yes" ];

       then mkdir -p $vmhgfs_mnt vmware_exec_selinux "$vmdb_answer_BINDIR/vmhgfs-fuse \ -o subtype=vmhgfs-fuse,allow_other,uid=33,gid=33 $vmhgfs_mnt"

    else vmware_exec_selinux "mount -t vmhgfs .host:/ $vmhgfs_mnt -o uid=33,gid=33" fi fi

}

  • tried to directly edit '/etc/fstab' and the os didnt boot to GUI anymore, I had to remove the line from command line.

style="margin:2px;font-family:proxima-nova, Arial, sans-serif;color:rgb(102, 102, 102)"

Is there any updated solution to this ?

0 Kudos
0 Replies