Page 1 of 1

Ubuntu guest: Fine-tuning Permissions in Shared Folder

Posted: 4. Dec 2012, 03:37
by kolyainmtl
My goal is to set up a ubuntu development environment that I can share with fellow developers that regularly code in Windows. I want to be able to simply mount their project folder on my VM and allow them to test their scripts/sites on it. I'm running Apache and other services on my Ubuntu Desktop 12.04 VM. The host is Windows 7 Ultimate Edition 64 bit. I want to avoid using network drives because we develop in Netbeans and it runs very poorly when using a network drive, which is why I'm trying to get it to work by reading the data directly from the Host using shared folders.

I have set up a shared folder and I am mounting it in fstab. I mount the shared folder such that the owner and group are both my user and have very open permissions across the board. This is working for me right now. That is, I set up a few vhosts in apache and it serves the sites just fine; however, I want to be able to fine-tune the permissions of the files and directory under the web root to simulate a production environment where I want to follow the principle of least privilege. I understand that because I'm developing in Windows which uses NTFS which in turn doesn't support POSIX-compliant permissions, the permissions can't be applied, but I find it hard to swallow that there's no way around this.

Right now, when I list the files in a directory, then do chmod on the files with the verbose option set, the system tells me that the mode has been changed as requested, however then when I list the files again, I can see the that the files' permissions remained as they were. I know I can change the permissions of all files or all directories when mount the shared folder but like I said, I don't want to be stuck with global permissions for files but I would like to be able to modify the permissions of the individual files as though they were stored on the VM.

Two solutions that come to mind:
1. Try to find a file system that supports POSIX permissions and can be used by Windows and create a partition that uses that file system and use a directory there as the shared folder, if such a file system even exists
2. Set up a cron on the VM to regularly rsync the contents of the shared folder to a directory local to the VM

I don't know if either of those ideas are feasible. Can anyone think of a more elegant solution to my problem?