2

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.

alexenko
  • 123
  • 3

1 Answers1

3

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.

womble
  • 95,029
  • 29
  • 173
  • 228
  • 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
  • 1
    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