Sticky Bit : synced_folders vagrant

262 Views Asked by At

I've a problem to add sticky bit to a synced folder into Vagrant.

I need to move, into guest, from /tmp to another /mytmp (more bigger), for MySQL tmp data file, because :

ERROR 3 (HY000): Error writing file '/tmp/MYQ4Gqvz' (Errcode: 28 - No space left on device)

So I've add into Vagrantfile:

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"]
  ......

But, when I try to pass statements to MySQL I've this message:

ERROR 6 (HY000): Error on delete of '/mytmp/MYwO1OzK' (Errcode: 26 - Text file busy)

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:

chmod +t /mytmp

doesn't add sticky bit to folder.

Could you give me some information about, for example if I can add a command to Vagrant mount_options?

I've tried also :

mount_options: ["dmode=1777,fmode=1777"]

nothing change..

Thanks a lot. Massimo

0

There are 0 best solutions below