views:

439

answers:

2

Hi,

I currently have an svn server running on a machine to which multiple users have root access. For the svn repository I want to use per-directory access control. So I user the mod_dav module with apache and specify permissions in /etc/svn-access-file The problem is that since multiple users have root access, then can potentially modify this file to access content that they shouldn't be able to. Is there a way to restrict access or prevent users from modifying the svn-access-file without disabling root access for everyone else?

Thanks, Gaurav

+3  A: 

You can set it to be readonly, then users will need to set rw before modifying. That will deal with accidents, but not with determined users. As soon as user is root all bets are off.

Eugene
Additionally, on some filesystems (ext2-4, xfs), `chattr +i` will cause a file to become immutable, which is yet another flag that needs to be reverted before writes are allowed.
ephemient
Guess I will have to go with the readonly option. BTW, is there a way that I can be notified every time a file is modified?
gveda
You can set up a simple cron script and compare checksums every time. Not sure there is a better way.
Eugene
http://people.redhat.com/sgrubb/audit/
ephemient
A: 

Nope. Any user who can become root has absolute power over the system. That's why you shouldn't be handing out root user privileges to people for free. A better idea would be to restrict the privilege level of the other users (assuming you are authorized to do so), and use groups to selectively enable access rights.

Michael Aaron Safyan
It is possible to use SE Linux to restrict "root" accounts: see http://www.coker.com.au/selinux/play.html for a demonstration. However, traditional UNIX permissions are still much easier to set up.
ephemient