Monday, 12 August 2013

Unalterable folder or path to keep a mount point on Linux

Unalterable folder or path to keep a mount point on Linux

I need to mount a tmpfs on a folder like /home/mysite.com/cache but this
folder can be delete or changed by a user, but I don't want that the
mounted filesystem become broken.
Then if the user moves this folder to /home/mysite.com/cache_old and
recreate a folder /home/mysite.com/cache, the mount point (with tmpfs)
stays ready. Also, even this folder doesn't exists at the start of the
system, the tmpfs become ready if this folder is created after.
Is there a way to do it ?

No comments:

Post a Comment