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

How do I create a loopback mount which exposes a given directory as a read-only filesystem? As contrasted with a loopback mount which exposes a file as a filesystem?

share|improve this question
up vote 12 down vote accepted

I would imagine that mount -o bind,ro /some/directory /where/you/want/it/to/be/readonly should do the trick.

share|improve this answer
Just be sure that you're on at least a 2.6.26 kernel or this will silently bind mount with the same options as the original mount-point. See: – Evan Anderson Jul 21 '09 at 0:55
Works like a charm, thanks! And thanks for the caveat, Evan. – Avdi Jul 22 '09 at 14:22
should be able to do mount --bind -o ro, too – warren Nov 30 '09 at 8:22

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.