Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have ubuntu 11 server installed as a virual machine using vmware fusion. Some of my files are on the mounted drive /mnt/hgfs in order to be shared with my mac.

Everything works fine until I change any of the files on the mounted drive. For example when doing a reboot and then a:

$ ll /mnt/hgfs/public/index.php

It returns:

-rw-r--r-- 1 501 dialout 251 2011-08-01 01:59 /mnt/hgfs/public/index.php

But when I CHANGE the file on the mounted drive and then again

$ ll /mnt/hgfs/public/index.php

The output is:

ls: cannot access /mnt/hgfs/public/index.php: Invalid argument

Whats wrong here?

I mounted the drive with

$ sudo mount -t vmhgfs -v -o ro .host:/my-app /mnt/hgfs
share|improve this question
    
Same here with Ubuntu 11.04. Ubuntu 10.04 on the exact same set-up works fine. Hardware config in my case is VMware Fusion-3.1.3-416484, on an iMac OS X v10.7 (same problem with v10.6). I suspect it's more a VMWare problem than Ubuntu but Windows 7 and Ubuntu 10 both work flawlessly on the same set-up. I do a lot of routine networking between Windows/Ubuntu 10/Host iMac daily. Only 11.04 has serious problems. Same problem with either VMWare supplied vmware-tools or open-vm tools, too. –  gruvin Aug 2 '11 at 5:50
    
I can confirm this, I have the same hardware (os x 10.6) and the same vmware fusion version. Have you found any workaround? Currently I am working via SSH/vim on that local machine as I dont want to setup a new 10.04 vm… I noticed that flaw only after I made my whole server setup. –  Max Aug 2 '11 at 6:46
    
I´ll give up for now, used another image with ubuntu 10.10 as base and now folder sharing works again. A day of work wasted but whatever. –  Max Aug 2 '11 at 10:30
    
This is definitely a problem with VMware's tools, and you should report it as a bug with them. They've been very responsive to me in the past for issues like the one above, even when I report them in pre-release versions of Ubuntu. I'm sure they'd be interested in hearing about it! –  SpamapS Aug 5 '11 at 16:35
1  
Same problem here. I don't think that it is restricted to VMware fusion though. When I couldn't get it to work under fusion I installed Parallels Desktop (6.0) and I have the same problem there with Ubuntu 11.04 –  andy47 Sep 1 '11 at 10:45

2 Answers 2

This is how I fixed it: http://viraj-workstuff.blogspot.com/2013/07/vmware-fusion-permissions-on-shared.html

VMWare should be able to use this fix this for once and all.

  1. sudo vim /etc/vmware-tools/services.sh
  2. Search for 'vmhgfs_mnt="/mnt/hgfs"'. After this line add: 'vmuser=${VMWARE_MNT_USER:-root}'
  3. Then search for 'vmware_exec_selinux "mount -t vmhgfs .host:/ $vmhgfs_mnt"' and replace it with following section: uid=id --user $vmuser gid=id --group $vmuser vmware_exec_selinux "mount -t vmhgfs .host:/ $vmhgfs_mnt -o uid=$uid,gid=$gid"
  4. sudo vim /etc/init/vmware-tools.conf Before the "pre-start" and "post-stop" lines add: env VMWARE_MNT_USER=[The guest user you want]
  5. sudo reboot
share|improve this answer
    
It would be preferable to expand on the link and provide instructions in the answer, just using the link as a reference. –  Richard Nov 20 '13 at 22:54

I reported this bug a long time ago to vmware and no one is fixing it. http://communities.vmware.com/message/1843232

It really is a shame as it's the only show major issue that I ran with vmware in years.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.