2

I'm trying to create a soft link of my Dropbox shared folder with:

ln -s Dropbox ~/Desktop 

But I am not being successful. The link is created, but is broken and I can't access the folder through it.

1

When I run ls -la in /mnt/hgfs I get this:

dr-xr-xr-x 1 root root    4192 Nov 14 17:04 .
drwxr-xr-x 3 root root    4096 Nov 14 16:06 ..
drwx------ 1  501 dialout  782 Nov 14 13:10 Dropbox

What is user 501?

I tried changing the ownership of the folder to my user and to root, but none seems to work. Shouldn't root be able to change any File or Directory ownership to itself?

chown -R root:root Dropbox
chown: changing ownership of ‘Dropbox’: Operation not permitted

Any help would be appreciated.

Thank you.

2
  • What does VmWare Fusion have to do with this?
    – guntbert
    Nov 14 '13 at 17:57
  • Maybe the user created 501 has something to do with it?
    – jpgamaral
    Nov 14 '13 at 23:21
5

Use this fix: http://viraj-workstuff.blogspot.com/2013/07/vmware-fusion-permissions-on-shared.html

This should be a more permanent fix.

  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

NOTE: This will have to be redone when you update/reinstall vmware-tools.

1
  • Please include the gist of the answer here, in your own words.
    – jobin
    Mar 18 '14 at 18:07
4

I'm now using Fusion 8.5, and there's no services.sh any more

Open /etc/init.d/vmware-tools then find and edit the following block (see the uid and gid)

# 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=1000,gid=1000 $vmhgfs_mnt"
    else
      vmware_exec_selinux "mount -t vmhgfs .host:/ $vmhgfs_mnt -o uid=1000,gid=1000"
    fi
  fi
}
1
  • This worked like a charm for me, changing the ownership to the user normally logged in.. Wonderful!! Thank you! Feb 7 '19 at 12:23
1

Run

sudo chown -R YOUR-USER-NAME:YOUR-USER-NAME Dropbox
2
  • That does not work. ` chmod: invalid mode`
    – jpgamaral
    Nov 14 '13 at 23:18
  • I have done a mistake. It should be chown not chmod. I edited the answer
    – user224082
    Nov 15 '13 at 1:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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