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
  • 2
    FWIW, the rename() behavior you're referring to where it will atomically replace has been around since at least SVR4 and early editions of the original BSD, so it's pretty solidly present in historical systems too. The behavior itself has long since been codified in POSIX (I'm pretty sure it was in the original spec) and the Single Unix Specification as a mandatory part of the VFS API. Commented Jan 19, 2018 at 20:19
  • Sorry, I'm confused: are you saying that if I run mount --make-rprivate / inside the unshare -m shell, that will stop the bind mounts from disappearing? I can't reproduce this. Commented Jan 21, 2018 at 4:01
  • Hmm, I think you're right, that part of the answer is completely wrong. Commented Jan 21, 2018 at 9:49
  • You can't stop file deletion propagating from one view of a tmpfs to another view of the same tmpfs. It's the same tmpfs with the same files. Except in the sense that you can hide the entire directory which contains the file you're going to delete, by overmounting it. Commented Jan 21, 2018 at 9:55