Repair a crashing Personal File Sharing service

Feb 27, '07 07:30:05AM

Contributed by: robg

For the last couple of weeks, I've had a most annoying problem: Personal File Sharing (in the Sharing System Preferences panel) on my Mac Pro would crash whenever I connected to the machine from another Mac. I could restart file sharing, but it would crash again the next time I tried to connect. To further complicate troubleshooting, connecting as a guest worked perfectly -- it was only when I tried to login as me that file sharing would crash. Needless to say, this made it most difficult to transfer files around the house. After much work with Google, trying to find the right terms to search with, I eventually stumbled onto the solution ... right here on our very own forums! To make the solution a bit easier for others to find, I'm posting it here, without the crash logs and other detail you can find in the linked post above.

The problem turned out to be a missing file, com.apple.ByteRangeLocking.plist, which is supposed to reside in the top-level /Library » Preferences folder. On my Mac Pro, it was missing (as was /var/db/BRLM.db, another file sharing-related file). The fix? You can copy the file from another Mac. However, it's a simple file, and forum poster voldenuit posted the contents:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>DB_HASH_TABLE_MAX</key>
  <integer>4096</integer>
  <key>DB_INIT_SIZE</key>
  <integer>2097152</integer>
  <key>DB_Location</key>
  <string>/var/db/BRLM.db</string>
  <key>DB_PROC_TABLE_MAX</key>
  <integer>1000</integer>
</dict>
</plist>

I copied the above code, ran sudo vi com.apple.ByteRangeLocking.plist (from the /Library » Preferences directory) to open the editor as root, then I pasted the code and saved the changes.

When I restarted Personal File Sharing, it worked perfectly: the BRLM.db file was created automatically, and I could once again login as myself without crashing the server. Hooray!

Comments (7)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20070226213016446