Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • Remount read-only? Commented Jun 9, 2014 at 11:03
  • Would really prefer not to do that! Is there any way wild cards can be used in the user list? Commented Jun 9, 2014 at 11:10
  • 2
    On Linux, you can bind mount a specific directory over itself as read-only (mount --bind dir dir && mount --bind -o remount,ro dir). You can also make all the files owned root:root and chmod -R a-w dir. You can also set the immutable flag which will make the files unwritable regardless of the permissions. Commented Jun 9, 2014 at 11:14
  • @StéphaneChazelas Read-only bind mounts have come and go over the years and the distributions… See the comments on unix.stackexchange.com/questions/128336/… and unix.stackexchange.com/questions/49800/…. Better not recommend them unless you know what distribution and kernel version are in use. Commented Jun 10, 2014 at 0:26