# How crucial is \`dereference\` -support for symlink- in ssh transport plugin

**URL:** <https://aiida.discourse.group/t/how-crucial-is-dereference-support-for-symlink-in-ssh-transport-plugin/413>\
**Category:** Developer\
**Created:** [June 10, 2024, 7:33pm UTC](https://aiida.discourse.group/t/how-crucial-is-dereference-support-for-symlink-in-ssh-transport-plugin/413 "2024-06-10T19:33:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ali-khosravi](https://yyz2.discourse-cdn.com/free1/user_avatar/aiida.discourse.group/ali-khosravi/32/58_2.png) [@ali-khosravi](https://aiida.discourse.group/u/ali-khosravi)\
**Post date:** [June 10, 2024, 7:33pm UTC](https://aiida.discourse.group/t/how-crucial-is-dereference-support-for-symlink-in-ssh-transport-plugin/413/1 "2024-06-10T19:33:51Z")

</div>

Just a quick inquiry:  
Does anybody know how dependent AiiDA plugins are on \*`dereference=True` option in either of the `copy()`, `get()`, or `put()` methods of the ssh transport plugin?

\*Dereferencing causes these methods to act on the files symbolic links point to, instead of the links themselves.

---

<div class="post-metadata">

**Author:** ![ali-khosravi](https://yyz2.discourse-cdn.com/free1/user_avatar/aiida.discourse.group/ali-khosravi/32/58_2.png) [@ali-khosravi](https://aiida.discourse.group/u/ali-khosravi)\
**Post date:** [June 11, 2024, 10:08am UTC](https://aiida.discourse.group/t/how-crucial-is-dereference-support-for-symlink-in-ssh-transport-plugin/413/2 "2024-06-11T10:08:14Z")

</div>

Now I see, in the ssh plugin for example, `copy()` is always used with `dereference=False` while `put()` and `get()` are usually used with `dereference=True`.

What I found strange is that all the three ignore dereferencing symlinks pointing to a directory, even if `dereference=True`. I think we need to document this behavior.  
One more problem is, `copy(dereference=False)` does not handle symlinks with relative paths correctly. It seems they are not converted to absolute paths before copying, which can cause them to break afterwards.

I’ll create an issue for these points on GitHub.

Still I’m not clear how and if other plugins, [`qe`, `vasp`, etc…](https://aiidateam.github.io/aiida-registry/) are using `dereferencing` feature.  
But apparently, since nothing has broken so far, I think the above explanation is the mostly expected behavior from a transport plugin.
