code: def get_file_perms(self,
  	                   filename,
  	                   note=None,
  	                   loglevel=logging.DEBUG):
  		
  		shutit = self.shutit
  		shutit.handle_note(note)
  		cmd = ' command stat -c %a ' + filename
  		self.send(ShutItSendSpec(self,
  		                         send=' ' + cmd,
  		                         check_exit=False,
  		                         echo=False,
  		                         loglevel=loglevel,
  		                         ignore_background=True))
  		res = shutit.match_string(self.pexpect_child.before, '([0-9][0-9][0-9])')
  		shutit.handle_note_after(note=note)
  		return res
docs: Returns the permissions of the file on the target as an octal
  		string triplet.
  
  		@param filename:  Filename to get permissions of.
  		@param note:      See send()
  
  		@type filename:   string
  
  		@rtype:           string