Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I run my own git server on my debian server. I use gitosis for access control. I noticed that my /opt/vc directory changes ownership from git:git to myUsername:myDefaultGroup every so often. Almost like something runs chwon -R myUsername:myDefaultGroup /opt/vc on it. I haven't been able to pinpoint the exact timeframe of changes. This causes gitosis to not work anymore as it doesn't have permissions to read/write the directory. There is nothing in root crontab that would cause this.

Can someone help me track down what causes the file ownership changes? This didn't happen when I originally installed git/gitosis, it started only recently and I don't remember doing anything that would cause this.

share|improve this question
up vote 2 down vote accepted

I'd wire up some auditd logging to see what's doing it. The following audit rule should do the trick:

auditctl -w /opt/vc/ -S chown

Then wait until it happens and check your audit logs. (It might be a good idea to test that everything's running OK by doing a chown in there somewhere and making sure it shows up in the logs).

The only other thing that can change permissions on a standard is mounting another filesystem over the top, but that causes so many other problems that I hope you would have noticed it.

share|improve this answer
No, pretty sure it's not a mount. I setup auditd as shown. The permissions reset this morning, I may have to wait until tomorrow for an update. – alexenko Jul 23 '12 at 14:52
It turns out it was one of my scripts I use to keep the permissions correct for the media server. When I was switching partition/drive git used, I accidentally had it mounted 2x under 2 different mount points and the 2nd one was hit by my script every night. ID10T error, the problem was between keyboard and chair :( – alexenko Jul 24 '12 at 13:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.