-1

I am running Ubuntu 14.04 and MS Word 2013 through VMware Player 7.0. I share files between my guest and host by mounting my home as a network folder in VMPlayer. My problem is that every time I save a file with Word (tested with .pdf and .docx), it is saved with permissions -rwxr-xr-x. My already existing word files all have permissions -rw-rw-r--, which seems more sound to me. These more restrictive permissions are also used by LibreOffice when saving as both .odt and .docx.

I read some old threads about a similar issue occurring with Word on OS X a while back, but could not find anything related to why it is happening for me. Does anyone know why these files are saved with executable permissions? How can I fix it other than manually changing permissions with chmod? Is there any harm in them being executables other than confusing me in terminal?

Cheers,

UPDATE

I did some more testing and it turns out that every single file creating in the windows guest get executable permissions set. I also tried VMPlayer 6.0.3 and the same thing occurred. I must have missed this when creating files previously. I wonder why these are the default permissions and if they can be changed, but according to what @gronosaj commented, it seems like an issue that is hard to work around. I posted about this over at the VMware Player forums and here on SU to see if they can give me any further information.

  • This likely has to do with the way Ubuntu is reading the permissions on the files more than anything. Both of those file archive formats with additional files that only contain text contained within them. If you are worried just change the permissions. – Ramhound Feb 2 '15 at 17:15
  • 2
    Windows doesn't have x flag at all, so virtualization software has to either set it everywhere, nowhere or for some files only. Apparently these files are executable by default because software designers decided so. We're unable to answer your question. – gronostaj Feb 2 '15 at 17:29
  • The permissions don't make a file executable, they are just permissions. If a file is not an executable, it can't be executed regardless of the permissions. – fixer1234 Feb 2 '15 at 18:05
  • Thanks for the comments, not sure I understand the downvotes though. I edited the wording to say "executable permissions" instead of just "executable". And thanks for the suggestions @gronostaj, I recently updated my VMware so it might be something in the new version. I will test with an older one and also other programs in the VM. – joelostblom Feb 2 '15 at 19:20
  • 1
    I think, whatever it is, it might not have that much to do with Word. And more to do with file related things post facto A)The extension B)The file's contents C)The Windows permissions on the file. The question you could ask is How does vmplayer decide whether a file on a windows virtual machine will have executable permissions when shared with a linux host – barlop Feb 2 '15 at 19:31
0

Windows has its own security model (ACLs, ACEs), which is supported by NTFS.

Linux does not support this security model. When you mount an NTFS volume in Linux, every file will have the same mode (permission bits), owner, and group-owner. This can be set in the mount options when mounting it. So whatever is mounting it has the mode set to 777 or similar.

The same happens for FAT filesystems.

  • But I am not mounting an NTFS volume in Linux. My OS is Ubuntu and I am running a WMware Player virtual machine with Win8.1. My home directory is mapped as a network drive in Win8.1 so that I can share files between my guest and host. Or do you mean that WMware Player somehow automatically sets up a mounted virtual NTFS partition to install windows on and this is causing problems? – joelostblom Feb 3 '15 at 0:41
  • Since you're mapping your Ubuntu homedir as a network drive in the guest virtual machine running Windows, it's likely that the homedir is being shared out from your Ubuntu host to the Windows guest via Samba - it's a service that runs under linux OS's that shares directories via Windows file sharing. The Samba configuration will have settings for the file create UMASK which dictates the permissions on all files saved to the samba share. I'm not familiar with Ubuntu so you'll have to check its documentation on how to configure this. If I recall correctly, this is also in the smb.conf file. – Dawn Benton Feb 26 '15 at 3:42
0

The symptoms you have look exactly like what I experienced using a Windows Guest VM with a Samba share and POSIX ACLs enabled for the Linux Ext4 filesystem.

Assuming guest sharing is running through something like samba (maybe VMWare player reuses some samba code), it may be a combination of a few things:

  • The map archive samba feature could on (it re-uses the unix execute bit for owner) to provide windows with the 'Archive' flag, and office docs typically have that set.
  • Microsoft office applications don't just create files, they also do extra shuffling around and renaming of ~*.tmp files used to provide recovery features. And while doing so, change some file permissions. See Samba create mask not working correctly for a more detailed explination.
  • "Wrong behaviour for default ACLs" looks like it could also be related to a bug in Samba.

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.