<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_file_perms(self, 	 filename, 	 note=None, 	 loglevel=logging.DEBUG):
 		"""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 		"""

		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