What is the best way to share a folder between Win7 64bit (host) and Ubuntu 10.10 (guest) in VMware player?

I can setup the sharing just fine (using vmware-tools), but all shared files are root:root owned with 777 permission set. Which, well, sucks.

What can I do to have shared files with preserved ownership and permissions?

I'm guessing I would need some kind of a file container, that would get mounted in Ubuntu as a block device (if so, it would need to be dynamic, i.e. expand with size of contained files). But maybe there is a better solution?


Make A folder at Desktop & Make a link

Terminal. ln -s /mnt/hgfs/shared-directory ~/Desktop/Name-of-the-folder

You will have shared files with preserved ownership and permissions


  • this trick will do the work – One Zero Feb 23 '12 at 18:29

You cannot preserve ownership and permissions unless the authentication mechanism is the same (What does user 1000 in Ubuntu mean in Windows?). Sharing authentication would mean using an LDAP (Active Directory) server.

What I do on my network is to set up a smb shared directory (Windows Share/or SAMBA Share) from outside VMWare or VirtualBox. The client/guest will have to provide credentials that the server can validate, but everything works with preserved permissions (share and folder) then on.

On the main menu in Ubuntu, select Places/Connect to Server/Windows share, and the logged-in user will gain whatever access the provided credentials allow. Permanently mounting the share requires that the user credentials be exposed in /ect/fstab, and be the same for all users, so skip that.

Lastly smbfs may be able to mount the share with the correct user permissions, but I haven't tried/needed it.

  • Does setting a o+x attribute in Ubuntu for a file that is on a Samba share @ Windows work as expected? – Paweł Gościcki Mar 14 '11 at 10:27
  • @Pawel You can't change permissions from the guest OS unless you've unified authentication. Then, in general, both OS's will avoid changing the permissions of files in file systems that are not native to them. – Apalala Mar 14 '11 at 18:41
  • Keep in mind that I have the opposite setup (Windows over Ubuntu) than the one you're after; in mine, the ext3/4 file system permissions over Linux authentication prevail, and the privileges and masks effective through smb are the ones made explicit in the samba configuration. – Apalala Mar 14 '11 at 18:41
  • Let me rephrase. If I have two files under Linux, which are 644 and 755, will they keep those permissions after copying them over to the Samba share? – Paweł Gościcki Mar 15 '11 at 7:17

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.