Another way to use personal web sharing and FileVault
I noticed that Personal Web Sharing was only partially functional when using FileVault. More precisely, accessing the users web pages inside ~/Sites using a URL similar to http://localhost/~username would always fail with a permissions error. The reason for this failure is fairly simple. When the FileVault user logs in, the encrypted disk image /Users/.username/username.sparseimage is mounted as /Users/username. Apple righty decided that a user using FileVault was trying to protect personal data, and so they set the access rights of /Users/username to 700 (rwx------), thus allowing only the user herself to access anything in her $HOME directory. Unfortunately, this has the side effect of preventing the local Apache server from accessing the contents of /Users/username/Sites/ resulting in the aforementioned error. A simple but unsafe solution: A simple solution would be to change the access rights of ...
published on Monday, the 31. December 2008, macosxhints
10.5: Leopard, Spotlight, and sparse disk images
After moving some .sparseimages I created in Tiger to Leopard, upon mounting them, I noticed that Spotlight was not finding items that I knew existed on them. After turning off and re-enabling indexing for the volumes via Terminal several times with no luck, (and yes, I did wait long enough for Spotlight to finish the indexing process), I realized that if I created a new folder on the .sparseimage, it would show up in a search. However, none of the pre-existing files/folders would be found. Then I tried renaming one of the pre-existing folders, and the new name showed up in a search. Then I renamed it back to the original name, and all was well. I also noticed that renaming only seems necessary for items on the top level of the disk, since any nested items I searched for started showing up in Spotlight after renaming the top folder. [robg adds: I can't confirm t...
published on Tuesday, the 4. December 2007, macosxhints
Possible recovery of a corrupted FileVault disk image
Somehow my FileVault image became corrupted, and I could not login. The following steps helped me get things working again. First, login as the root user -- you'll need to enable root (Pre-10.5, 10.5). On your hard drive, find this file: /Users » username » username.sparseimage; it might instead be found in /Users » .username %raquo; .username.sparseimage, where username is the short username of the user with the corrupted image. Make a copy of this fiel for back up purposes, in case something goes wrong. Of course you can try to mount it, repair permissions, etc., but I was not able to do this. Next, reboot your machine from the DiskWarrior CD. In the DiskWarrior window (in t...
published on Monday, the 19. November 2007, macosxhints
FileVault Lite
Several people want to use FileVault-type protection on less than their entire home folder. I do this to use the same type of protection but for a single folder.1. Using Disk Utility (in Applications > Utilities), create a sparse disk image using AES-128 encryption. I made mine the size of a DVD so it would never become too large to back-up to a DVD. Also, I saved mine at the top level in my home directory. 2. When creating the password, be sure to leave "Remember Password" checked, so that your keychain can open your disk. 3. Go to the Accounts preference pane (in Applications > System Preferences), and under Login Items, click + to add a login item. 4. Navigate to your 'xxxx.sparseimage' file and add it to the login items list. Now it will auto-mount every time you login. The only down-side to this hint that I can come up with is that the user must be proactive about where he or she places files. Also, if you place a file in the w...
published on Wednesday, the 3. October 2007, macosxhints