The owner and group of VMware's Shared Folder in macOS guest OS can't be changed by just using
chmod. Mounting of the VMware's Shared Folder is the task of VMware Tools and it is possible to change its owner and group during mounting.
VMware Tools uses a bash script to mount VMware's Shared Folder and it is located at:
/Library/Application Support/VMware Tools/services.sh
To add the command to change the owner to "webfoobar" and group to "staff" during mounting, open the
services.sh, look for
mount_vmhgfs and change its line to:
'/Library/Application Support/VMware Tools/mount_vmhgfs' '-o' 'rw,uid=webfoobar,gid=staff' '.host:/'"$SF" '/Volumes/'"$SF"
If you prefer the user ID and group ID instead of the label, execute the following to know the user ID and group ID:
... and it will out something like this:
... then use the user ID and group ID:
'/Library/Application Support/VMware Tools/mount_vmhgfs' '-o' 'rw,uid=501,gid=20' '.host:/'"$SF" '/Volumes/'"$SF"