# File lib/puppet/type/file.rb, line 307
307:   def asuser
308:     if self.should(:owner) and ! self.should(:owner).is_a?(Symbol)
309:       writeable = Puppet::Util::SUIDManager.asuser(self.should(:owner)) {
310:         FileTest.writable?(File.dirname(self[:path]))
311:       }
312: 
313:       # If the parent directory is writeable, then we execute
314:       # as the user in question.  Otherwise we'll rely on
315:       # the 'owner' property to do things.
316:       asuser = self.should(:owner) if writeable
317:     end
318: 
319:     asuser
320:   end