SVN: Changing Permissions on a Repo
2 min read • 246 words
When creating an SVN repository, it's quite easy to grant permissions to new users:
fs setacl path/to/repo/ rlidwk
However, once the repo has been created, its not quite as easy. From what I can tell, this is because this command sets the access control list (ACL) on the directory, and when you later svnadmin create path/to/repo/
, all of the new files (or files added any other way, for that matter) inherit the ACL from the parent directory (I am unclear as to whether this happens upon file creation, or upon access of the file, as it seems the only thing that matters in the solution is the ACL on the directories). Thus, if you need to change the ACL for an already existing repo, you will have to set the ACL on every directory within the repo as well. After much searching, and trial and error, I found that this can be done with the following command:
find path/to/repo/ -type d -exec fs setacl {} rlidwk;
Basically, what this command does is searches for all of the directories within the repository, and for each one, executes the fs setacl
command.
Note: At the very least this will apply to those on an OpenAFS network file server. At most, it will apply to more than that. Either way, it is the hope that somewhere, somewhat this post ends up helping somebody and saves them the time I put in trying to figure it out.