Just want to know, Is there any downtime by remounting /tmp filesystem.

  • step 1. mount -o remount defaults,exec /tmp
  • step 2. mount -o remount defaults,noexec,nosuid,nodev /tmp
  • 1
    Your question isn't clear. If you are asking if it will shutdown any of your services, you will need to analyze your especific case. Please, edit your question to be more clear and more people will reply to them. – Alexandre Teles Aug 20 '13 at 11:23
  • 1
    Why not spin up a VM and try it? – Journeyman Geek Aug 20 '13 at 11:26
  • No downtime. 1. First command will allow you have execution of any binaries on the mounted file system and second command will 2 Second command nosuid, Meaning do not allow set-user-identifier or set-group-identifier bits to take effect nodev, do not interpret character or block special devices on this file system partition noexec, do not allow execution of any binaries on the /tmp. Hope this will help other people. --- Thanks – skhalid555 Jul 28 at 19:19

If you just do -o remount without actually doing a umount and then mount none of the running processes should be affected other than that the IO might freeze for a short time because the FS has to flush it's buffers and write everything to disk. Open file descriptors should survive the remount and writes/reads should only be delayed but not aborted.

But I don't understand why you want to execute the mount -o remount twice, why don't you just directly do the second of your two steps if that's your final goal?

  • Thanks guys, I am installing software which will be executed from /tmp folder automatically, So we are having permission issues, So i want to remount with exec parameter. – skhalid555 Aug 20 '13 at 12:40
  • Thanks for the answer. I realize this is a really late comment but could you provide any documentation to support the claim that descriptors should survive the remount and writes/reads should only be delayed? I've been looking all over the net and this is the only answer I've found describing the effects of remount. – Chris Jones Jul 6 '14 at 1:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.