{"record":{"id":"8528767aee67016b","repo":"hashicorp/vagrant","slug":"vagrant-is-currently-configured-to-mount-smb-folde","errorCode":null,"errorMessage":"Vagrant is currently configured to mount SMB folders with the\n`mfsymlink` option enabled. This is equivalent to adding the\nfollowing to your Vagrantfile:\n\n  config.vm.synced_folder '/host/path', '/guest/path', type: \"smb\", mount_options: ['mfsymlink']\n\nThis option may be globally disabled with an environment variable:\n\n  VAGRANT_DISABLE_SMBMFSYMLINKS=1","messagePattern":"Vagrant is currently configured to mount SMB folders with the\n`mfsymlink` option enabled\\. This is equivalent to adding the\nfollowing to your Vagrantfile:\n\n  config\\.vm\\.synced_folder '/host/path', '/guest/path', type: \"smb\", mount_options: \\['mfsymlink'\\]\n\nThis option may be globally disabled with an environment variable:\n\n  VAGRANT_DISABLE_SMBMFSYMLINKS=1","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"plugins/guests/linux/cap/mount_smb_shared_folder.rb","lineNumber":89,"sourceCode":"                  output: stderr\n              end\n            end\n          ensure\n            # Always remove credentials file after mounting attempts\n            # have been completed\n            if !machine.config.vm.allow_fstab_modification\n              machine.communicate.sudo(\"rm /etc/smb_creds_#{name}\")\n            end\n          end\n\n          emit_upstart_notification(machine, expanded_guest_path)\n        end\n\n        def self.display_mfsymlinks_warning(env)\n          d_file = env.data_dir.join(\"mfsymlinks_warning\")\n          if !d_file.exist?\n            FileUtils.touch(d_file.to_path)\n            env.ui.warn(I18n.t(\"vagrant.actions.vm.smb.mfsymlink_warning\"))\n          end\n        end\n      end\n    end\n  end\nend\n","sourceCodeStart":71,"sourceCodeEnd":96,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/guests/linux/cap/mount_smb_shared_folder.rb#L71-L96","documentation":"Vagrant mounts Linux-guest SMB synced folders with the mfsymlink mount option by default (symbolic links are carried as minified files). This one-time notice, tracked by a mfsymlinks_warning marker file in the environment data_dir, explains the equivalent explicit mount_options and how to disable the behavior with VAGRANT_DISABLE_SMBMFSYMLINKS=1.","triggerScenarios":"The first SMB synced-folder mount on a Linux guest (vagrant up / vagrant reload) while env.data_dir/mfsymlinks_warning does not yet exist; display_mfsymlinks_warning touches the marker so subsequent runs are silent.","commonSituations":"macOS or Windows hosts sharing source trees to Linux guests; teams wanting deterministic CI output; users puzzled by symlink semantics over SMB.","solutions":["Do nothing — the notice is informational and prints once per project data dir","Set VAGRANT_DISABLE_SMBMFSYMLINKS=1 to disable the mfsymlink option globally","Make the behavior explicit with mount_options: ['mfsymlink'] on the synced folder","Delete .vagrant/mfsymlinks_warning if you want the notice shown again"],"exampleFix":"# before (implicit default, one-time notice)\nconfig.vm.synced_folder \"src\", \"/srv/app\", type: \"smb\"\n# after (explicit opt-in, understood behavior)\nconfig.vm.synced_folder \"src\", \"/srv/app\", type: \"smb\", mount_options: ['mfsymlink']","handlingStrategy":"validation","validationCode":"# Decide symlink strategy before the first up\nexport VAGRANT_DISABLE_SMBMFSYMLINKS=1   # or opt in explicitly via mount_options","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set the env var in the project's env setup so CI output is deterministic","Document the chosen symlink behavior next to the smb synced_folder config","Remember the notice is once per .vagrant data dir; deleting the dir re-prints it"],"tags":["vagrant","smb","synced-folder","linux-guest","mfsymlink"],"backgroundTag":"implicit-default-behavior","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}