File-level write protection in shared folder
Posted: 9. Apr 2018, 17:57
My setup is a Ubuntu Xenial host and a Windows XP guest. A set of Windows programs is stored in a directory tree on the linux disk, so that I can
In Windows I had a very successful protection scheme, by setting permissions at the file level. All directories with executables or libraries in them were write-protected, except for the occasional configuration file. And all files in writable directories had a no-execute file permission (forgot the English word for it). I am now trying to find the equivalent for this setup.
To my surprise a file in a shared folder that I chmodded to read-only, could be written to from the VM (even without explicitely removing the read-only flag in the VM itself). Other surprises may be lurking in a corner, and that is why I would like to have confirmation that this is a good protection scheme for my new setup :
- * manage the lot in my host
* execute (some of) these programs under wine, often with some limitations
* execute them in a Windows VM via VirtualBox shared folder as well
In Windows I had a very successful protection scheme, by setting permissions at the file level. All directories with executables or libraries in them were write-protected, except for the occasional configuration file. And all files in writable directories had a no-execute file permission (forgot the English word for it). I am now trying to find the equivalent for this setup.
To my surprise a file in a shared folder that I chmodded to read-only, could be written to from the VM (even without explicitely removing the read-only flag in the VM itself). Other surprises may be lurking in a corner, and that is why I would like to have confirmation that this is a good protection scheme for my new setup :
- * the shared folder is read/write (because of the configuration files that some programs write to on every execution)
* all directories in the directory tree are read/execute, no write. This prevents a rogue Windows program (or my thick fingers) to delete any file in it, or even the complete directory (which happened yesterday, I love backups)
* all files in the directory tree are owned by another user (for the moment root) than the one executing the VM, and not writable by 'other', so that no files can be infected by well written virusses or badly written applications.
* exception is made for a number of configuration files: these ARE writable by 'other'