To help make the mounted disk image less visible, you can run the SetFile command to make the volume's directory invisible. This will make the mounted disk image be less-obviously visible in the Finder sidebar for other users. Of course, this makes it less visible to you, too, but you can make an alias in the Finder to where the folder should be for you.
Run SetFile to make the mounted disk image image be invisible in the Finder:
SetFile -a V /Users/gabriele/MyDocs
Open the disk image location in the Finder:
open /Users/gabriele/MyDocs
Make an alias to make it easy for you to open the now-hidden MyDocs. Within the open Finder window, grab the folder icon in the top center where it says "MyDocs" and then drag that while holding down the Option+Command keys and release it on your Desktop, just not to /Users/gabriele
, because you will need to rename the alias first, otherwise it will not let you copy it. So rename the dragged-off "MyDoc" to "MyDoc alias", then move it to /Users/gabriele
or wherever you like. Now you should have the alias "MyDoc alias" to your hidden MyDoc directory, other users will not see it in the Finder sidebar.
Note: Xcode needs to be installed in order to use SetFile. Additionally, I had to relaunch the Finder on Lion for the mounted disk image to become invisible, try that if you can't get MyDoc to disappear.
Not sure how to prevent ejection, since anyone with access to Disk Utility, the mount
command, etc. can see the path to it and un-mount it for you. However, making it invisible does lessen the need to make it un-ejectable, since it will not be in other users' faces in the Finder as an option to eject.
Best Answer
The kind of items in your case hidden are named Favourites. To show them, go to a site where you can upload a file (e.g. https://encodable.com/uploaddemo/) and then click on "
Choose File
", like you said. When you are prompted to upload something, just hover your cursor on theFavourites
line, located on the top of the sidebar. A "Show
" button will be shown (no irony, at all). Click it and all of the items will re-appear. Done!If you have any more issues with this, feel free to comment.