Problems with Password Gorilla and symlinks

Hello,

I am using insync with a password manager software called Password Gorilla. I symlink the encrypted file in the insync folder but every time, or at least very often, I make a change in the password database, insync remove (the symlink to) that file from the insync folder.

I tried to replicate this behavior creating a normal text file and linking it, but in this case insync does not remove the symlink:

$ echo ciao mondo > ciao.txt
$ cd insync
$ ln -s ../ciao.txt
$ cd ..
$ mv ciao.txt ciao.txt~

Can you please investigate the cause of this? Am I correctly using symlinks with insync?

Thanks,
Marco

1 Like

Let me tag our engineer @lpugoy and he will get back to you

@mrc: Apologies for not relpying sooner. The issue is caused by the way Password Gorilla saves changes. Instead of modifying the file in place, what it does is create a new file and overwrite the old file with the new one. When the old file is overwritten Insync interprets it as being deleted and so removes the symlink. A workaround for this is to put the encrypted file in a folder and symlink that folder instead of the file directly.

I am having the same issue with files modified by a different program. Thank you @lpugoy for the workaround.

In case of a broken symlink, I would expect Insync to delete the file remotely but leave alone the broken symlink on the local filesystem. May I ask why Insync would delete broken symlinks?