Here's my setup:
Mac Mini running Snow Leopard
- Sharing a folder with a bunch of code in it. The folder and everything in it is set for read/write access for both the main user and the "staff" group
Desktop running Lubuntu 11.04 (LXDE Ubuntu)
- Accessing the share using Samba mount point as the Mini's main user
- Also SSHed into Mini (using same user) to run Git commands (haven't yet figured out how or if it's possible to grant read/write permissions to the Git setup on my desktop, doing it like this is slower than SSH anyway)
I'm doing it this way (as opposed to setting up the Mini as a Git server), because I'm looking to have a sort of satellite setup with my laptop (whose harddrive I don't trust after it corrupted a Git repo or three), and wanted to see if the whole setup is possible by using my desktop as guinea pig (I don't like actually working on Macs, and the Mini doesn't handle my workflow and needs well), as well as various other reasons (so please don't say "just set up the Mini as a Git server"). So far, it's been working quite well.
However, I keep running into a particular issue that I'm not sure how to fix. Every so often, one or more files in the share changes the permissions for the "staff" group to read-only.
The cases I've found this to happen so far are:
when I change branches in Git when I've changed a file and left it open in NetBeans (the change is committed to Git)
when the Mac goes to sleep, the file(s) I have open go to read-only
sometimes, when I change files on the Linux desktop, the Mac reacts by not only making it read-only, but also by deleting the contents of the file (thank Linus for
git checkout [filename]in those cases)
I've worked around 2 by making it not go to sleep after inactivity, but 1 is a little harder, as there are times when I switch between branches frequently, and I often keep the files open for various reasons.
For some reason, the Mini seems to think that the user using the share is part of the "staff" group, but not actually the main user, even though mounting the share uses the same credentials.
So, is there a way to either
- make sure the file doesn't go to read-only for the "staff" group, or
- make the mount be recognized as the same user as the owner of the share?