Page 1 of 1

Serious issue with symbolic links

PostPosted: Fri Jul 05, 2013 6:26 pm
by efi66
I've been running Hazel for a long time, and it's been great up until a couple weeks ago when I started using Parallels to run Windows apps.

After about a week of running Parallels, I was in the middle of using Windows when the entire virtual machine closed down saying the PVM file has been moved or deleted (this is the file that contains the virtual hard drive and settings!). Sure enough, it was gone from my documents folder. Frustrated at losing everything I'd done on the Windows side over the last week, I resigned myself to just reinstalling it and see what happens. A week later, bam! Gone again. This time I had a backup, but it was still frustrating. I was about to call tech support for Parallels when I got curious and checked the system log where I noticed Hazel was the one deleting it--even though it wasn't in the trash!!

After checking settings, I was about to disable Hazel when I noticed that Parallels creates an alias on the desktop of any VM you make. I'd been trashing them because I don't like the clutter, but on closer inspection, it's not an alias, but a symbolic link.

Evidently Hazel is deleting the link target instead of the link itself! This is very bad. I use links fairly often, so if there's a way to prevent this dangerous behavior I'd like to know! For now, I'll just use rm to delete them.

Re: Serious issue with symbolic links

PostPosted: Mon Jul 08, 2013 12:19 pm
by Mr_Noodle
Hazel shouldn't be doing that since (a) it only moves stuff to the trash and (b) if it's a link, it only moves the link. It shouldn't be deleting anything outright. Can you post the relevant logs? Also, post more info on these links?

Re: Serious issue with symbolic links

PostPosted: Mon Jul 08, 2013 3:30 pm
by efi66
Sorry, I should have been more clear. I have Hazel set to delete items from the trash after one week. The link in question is created by Parallels so you can quickly launch the VM from the desktop. It's a symbolic link that points to the .pvm file (which is actually a "package") that contains the settings and hard disk image for the VM. Why they chose to create links instead of just an alias I have no idea. I moved the link to the trash because I didn't need a shortcut as I just launch Parallels directly.

Here is the log:

Code: Select all
2013-07-05 13:50:47.395 hazelworker[349] File Windows XP.pvm has been sitting in the trash for too long. Purging.
2013-07-05 13:50:47.396 hazelworker[349] Removing Windows XP.pvm.
2013-07-05 13:50:47.690 hazelworker[349] [Trash Event] File purged from Trash: File Windows XP.pvm has been sitting in the Trash for too long and has been deleted.
2013-07-05 13:50:47.720 hazelworker[349] Error getting hidden status of file /Users/****/Documents/Parallels/Windows XP.pvm: Error Domain=NSCocoaErrorDomain Code=260 "The file “Windows XP.pvm” couldn’t be opened because there is no such file." UserInfo=0x7fc284315130 {NSURL=file://localhost/Users/****/Documents/Parallels/Windows%20XP.pvm/, NSFilePath=/Users/****/Documents/Parallels/Windows XP.pvm, NSUnderlyingError=0x7fc2843153d0 "The operation couldn’t be completed. No such file or directory"}


After it purges it, the link is still sitting in the trash, but the actual pvm file in my documents folder is now gone. It even does it while the VM is open, causing it to close down with an error. It also looks like it tries again after, but the target file is gone so it throws an error. But again, I'm just going by what the log seems to show.

Re: Serious issue with symbolic links

PostPosted: Tue Jul 09, 2013 12:33 pm
by Mr_Noodle
Do you have it set to delete securely or normally?

Re: Serious issue with symbolic links

PostPosted: Tue Jul 09, 2013 6:33 pm
by efi66
Normally. If it makes any difference, my drive is set up as a custom fusion drive (Samsung SSD + Apple HD) through CoreStorage.

Re: Serious issue with symbolic links

PostPosted: Thu Jul 11, 2013 4:18 pm
by Mr_Noodle
Odd, I would have expected it to be like this for secure deletion, not normal. I'll look into it.