title: Sticky Bit : synced_folders vagrant
body: <p>I've a problem to add sticky bit to a synced folder into Vagrant.</p>
  
  <p>I need to move, into guest, from /tmp to another /mytmp (more bigger), for MySQL tmp data file, because :</p>
  
  <pre><code>ERROR 3 (HY000): Error writing file '/tmp/MYQ4Gqvz' (Errcode: 28 - No space left on device)
  </code></pre>
  
  <p>So I've add into Vagrantfile:</p>
  
  <pre><code>Vagrant.configure(2) do |config|
    config.vm.provision "shell",
      inline: "echo 'Change permission';chmod +t /mytmp;touch /mytmp/test"
    ......
    config.vm.synced_folder "mytmp2/", "/mytmp",
      owner: "root", group: "root", mount_options: ["dmode=777,fmode=777"]
    ......
  </code></pre>
  
  <p>But,
  when I try to pass statements to MySQL I've this message:</p>
  
  <pre><code>ERROR 6 (HY000): Error on delete of '/mytmp/MYwO1OzK' (Errcode: 26 - Text file busy)
  </code></pre>
  
  <p>I think that with Sticky bit on /mytmp I can solve this problem (it's the only difference from /tmp and /mytmp folder) but in provisioning the command:</p>
  
  <pre><code>chmod +t /mytmp
  </code></pre>
  
  <p>doesn't add sticky bit to folder.</p>
  
  <p>Could you give me some information about, for example if I can add a command to Vagrant mount_options?</p>
  
  <p>I've tried also :</p>
  
  <pre><code>mount_options: ["dmode=1777,fmode=1777"]
  </code></pre>
  
  <p>nothing change..</p>
  
  <p>Thanks a lot.
  Massimo</p>