6

I would like to use a case-sensitive and encrypted disk-image for my development work. I need some folders inside it to be Dropbox-ed (using symlinks). However if I accidentally unmount the dmg, Dropbox erases everything in the cloud.

Therefore I need to prevent unmounting of this disk image (mounted at boot). Ideally it would require my session password when I click on the eject icon in the finder. Any ideas?

sblair
  • 12,757
Olivier
  • 1,549

3 Answers3

1

I use a ramdrive for a lot of work, so I've had to find a way to prevent accidental ejection.

My solution is similar to @slhck's.

  1. Open up a terminal.
  2. Open up a screen session.
  3. cd into the disk image you want to protect.
  4. Disconnect from that screen session (Ctrl-A and then D usually does the trick).

Finder will not immediately eject the volume, but will ask you if you want to force an eject.

The only caveat here is that I don't think screen comes with normal OS X, you'll need MacPorts to

Brad Patton
  • 10,668
Alex
  • 26
0

If I were you, I would mount it as an escalated user (root)

You can indeed use sudo to mount a device in OSX. I have not had a chance to see if it behaves the same way as in Unix because I dont have OSX. This should indeed force you to enter the password again to unmount it, correct?

At that point file permissions need to be set correctly. But it should not be unmountable except by an escalated user or issuing sudo.

steve
  • 622
0

You could do it the other way around - Keep the files in Dropbox and symlink them into your encrypted disk. Then Dropbox won't delete the files when you umount the disk and you still can access the files from your dev env.