I want to host a subversion repository on my MacBook, in some folder within my home directory. I want to give the person I will be working on this coding project SSH access, but only to this shared folder on my machine.

I realize I can do this by creating a standard or admin user account on my machine, but this person will never be using the computer, and I would rather create something like a sharing only account. Although it seems like it is not possible to allow SSH privileges to a Sharing Only account.

Anyone know how to do this?

OS X 10.6.7


I believe you want what is referred to as a "chroot jail." Snow Leopard does support chroot, so you could try to adapt this guide to suit your needs.

BSD Jails aren't fully supported in Snow Leopard's kernel.


what requirement is driving you to consider exactly this one solution for shared access to a repository? If you could sketch out what you want to achieve rather than what you want to implement then maybe there would be solutions easier to implement... hosted SVN comes to mind, or git and github, and lots of others

  • no requirement. this is just the best way to go about it in my opinion. I do not wish to host my code on anybody's servers but my own, I don't own a domain. I want to achieve exactly what I sketched out in the question. – finiteloop May 3 '11 at 19:42
  • great way to ask a question ;-) like going to the doctor and asking for a prescription. You could run pserver from the command line everytime you want to enable access for the guy and assign it a port >1024 so you don't have to be root. – Florenz Kley May 5 '11 at 12:07

This might be a bit of overkill, but you could create a VirtualBox guest OS that runs an ssh server, hosts your user accounts, and serves your repository files. That would be one way to keep your files completely isolated from your OSX machine.

VirtualBox has several network configuration settings that allow you to specify how the guest networks with the host. One of the options (Internal Network?), I believe, places your guest on the same "external" network that your host is on so it will be accessible from your local network.

It's been awhile since I have messed with it, but I think that may be one option available. Hope that helps, Joe

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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