   write: (text) ->
     previouslyExisted = @exists()
     @cachedContents = text
-    fs.writeFileSync(@getPath(), text)
+    @writeFileWithPrivilegeEscalationSync(@getPath(), text)
     @subscribeToNativeChangeEvents() if not previouslyExisted and @hasSubscriptions()
 
   # Deprecated

  getDigest: ->
    @digest ? @setDigest(@readSync())

  handleNativeChangeEvent: (eventType, path) ->
    if eventType is "delete"
      @unsubscribeFromNativeChangeEvents()

{Emitter} = require 'emissary'
_ = require 'underscore-plus'
fs = require 'fs-plus'
runas = require 'runas'

# Public: Represents an individual file.
#
