# Hgfs shared filesystem in VMWare does not support symlinks

**URL:** https://meta.discourse.org/t/hgfs-shared-filesystem-in-vmware-does-not-support-symlinks/76797
**Category:** Development
**Created:** [December 27, 2017, 4:48am UTC](https://meta.discourse.org/t/hgfs-shared-filesystem-in-vmware-does-not-support-symlinks/76797 "2017-12-27T04:48:29Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![dmitry\_fedyuk](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dmitry_fedyuk/32/293153_2.png) [@dmitry\_fedyuk](https://meta.discourse.org/u/dmitry_fedyuk)
#### Post date: [December 27, 2017, 5:45am UTC](https://meta.discourse.org/t/hgfs-shared-filesystem-in-vmware-does-not-support-symlinks/76797/4 "2017-12-27T05:45:35Z")

</div>

My workaround is to patch the [`Plugin::Instance.activate!`](https://github.com/discourse/discourse/blob/v1.9.0.beta17/lib/plugin/instance.rb#L408-L461) method.

Locate the code:

> <https://github.com/discourse/discourse/blob/v1.9.0.beta17/lib/plugin/instance.rb#L458-L459>

Replace it with the code:

```plaintext
Discourse::Utils.execute_command('rm', '-rf', target)
begin
  Discourse::Utils.execute_command('ln', '-s', public_data, target)
rescue
  Discourse::Utils.execute_command('cp', '-r', public_data, target)
end

```

---

_[View the full topic](https://meta.discourse.org/t/hgfs-shared-filesystem-in-vmware-does-not-support-symlinks/76797)._
