Prevent the possiblity of writing data to an unmounted mount point directory [duplicate]

I go a step further and always set the attributes of my mountpoint directories to immutable using chattr.

This is accomplished with chattr +i /mountpoint (with the mount unmounted).

This would error-out on new write activity and also protects the mount point in other situations.

But I suppose you could use the mountpoint command, too 😉

Leave a Comment